• No results found

Integrating the SAP NetWeaver Application Server Java For the development process to be supported efficiently, it must be easy For the development process to be supported efficiently, it must be easy

2 Overview of the SAP NetWeaver Developer Studio

2.4 Integration Platform

2.4.2 Integrating the SAP NetWeaver Application Server Java For the development process to be supported efficiently, it must be easy For the development process to be supported efficiently, it must be easy

to access a deployment and server environment. The current status of a project can be deployed on an application server in the LAN with mini-mal administrative effort and the application can be executed on this server for test purposes. Another important requirement is that debug-ging can be initiated from the development environment and controlled centrally in all steps. The Developer Studio provides an optimum infra-structure for doing this as well as the relevant tool support.

Transparency of the Cluster Architecture

The tight server integration makes the cluster architecture of the SAP NetWeaver Application Server Java transparent for the Developer Stu-dio and allows it to appear as a single server unit with all available Java instances and the associated server processes. Figure 2.8 shows the main components of the SAP application server grouped as you will find them in the Developer Studio using various displayed modes.

Overview of the SAP NetWeaver Developer Studio

2

SAP Application Server Java

An AS Java cluster consists of various types of instances, which can all be started and stopped separately, as well as monitored and controlled using suitable monitoring tools. We differentiate between the following instances:

왘 The actual Java instances

왘 The central service instances

왘 One or more database instances

Each Java instance in an AS Java cluster can be perceived as a unit, which is identified by an instance number and in turn consists of a com-ponent known as the Internet Communication Manager (ICM) and usu-ally several server processes. The ICM is a kind of entry point for each Java instance and mainly has the task of receiving the inbound requests and distributing them to the available processes. The server processes are used to execute the actual Java applications and pick out precisely those requests that the ICM assigns to them. Furthermore, each installa-tion of an AS Java contains central service instances. These form the basis for communication and synchronization within an AS cluster and comprise mainly the message service and the enqueue service. While the message service is responsible for the exchange of information and load balancing in the cluster and therefore provides the ICM with infor-mation about the availability of individual server processes, for

exam-Figure 2.8 Cluster Architecture of the SAP NetWeaver Application Server Java Database SAP NetWeaver

Developer Studio

SAP NetWeaver Application Server Java

Java Instance

ICM

Central Service Instances Message

Service Enqueue Service Server Process

Integration Platform 2.4

ple, the enqueue service has the task of managing lock objects and thus ensuring internal synchronization within a cluster.

Depending on the use scenario and the scope of the SAP NetWeaver Application Server Java components to be installed, we distinguish between the following configurations for server operation:

Minimal AS Java installation 왘 A minimal setup for the server operation consists of only one Java

instance, which always includes an ICM and at least one server pro-cess. This installation also includes two central service instances, the message service, the enqueue service, and a database.

AS Java cluster installation 왘 In contrast, a typical cluster installation has more than one Java

instance, the central service instances, and additionally one or more databases. In this case, various instances can be distributed among different machines in the network. On the other hand, the message service and the enqueue service are installed on a central host that serves all participating instances.

Server Operation Support in Run and Debug Mode

In the simplest scenario for the minimal AS Java installation, the appli-cation server is installed on the same local developer PC as the Devel-oper Studio. This simple stand-alone version is generally based on a sin-gle-server configuration. In this case, the application server consists of only one instance (shown in Figure 2.9 as 00), which in turn includes the ICM and the actual server process (shown in Figure 2.9 as Server0) as further processes. With the server process node, you can toggle between the run mode and the debug mode for the server process nodes. If debugging has been activated once, the server is stopped and the con-nection to the server is reserved completely for the debug session.

LAN scenario

In general, developers access an application server from the Developer Studio, which is installed on any computer in the LAN. The Developer Studio and the server (including the database) can be distributed to dif-ferent servers. Nevertheless, a single-server configuration should be the exception rather than the rule in developer teams; instead, you will usu-ally find a cluster configuration in these circumstances.

Overview of the SAP NetWeaver Developer Studio

2

A typical AS Java cluster configuration groups together several Java instances (shown in Figure 2.10 as 00, 03, and 07). Each of these instances consists of an ICM and one node or several nodes that repre-sent the actual server processes (Server0, Server1, ..., ServerN). In such a cluster configuration, one or possibly even several server nodes can be reserved for debugging.

When debugging has been activated, the reserved server is removed from the cluster configuration by the message service and it is then

Figure 2.9 Nodes for the Single-Server Configuration

Figure 2.10 Nodes in a Cluster Configuration with More Than One Java Instance Java Instance

Single Server Configuration

00

ICM

Server0 Run Debug

00

07 03

ICM Server 1

ICM Server 0 Server 1 Server N

... Active Nodes

Cluster with Several Instances

Instance

Process Node

Run Run

Active Node Debug

Debug Server 0

Integration Platform 2.4

reserved solely for debugging. For that reason, incoming requests are no longer forwarded to the reserved nodes. A debug session can take place using the debug port of the reserved debug node without influencing the remaining server nodes in the cluster.

In a production system, most nodes are reserved for operating the appli-cation server and therefore have a productive status. Such productive server nodes cannot be used for debugging.

WAN scenario

In the WAN scenario, the application server runs outside of the firewall.

An important example of the use of this scenario is remote debugging in a customer system. SAP provides special services for accessing applica-tions on the customer side using HTTP and debugging the correspond-ing projects. The server connection is made uscorrespond-ing the SAP router tech-nology through firewalls.

Tool Support

Registering the AS Java using the Preferences page

The appropriate server integration information and settings are entered in the Developer Studio on the Preferences page. As shown in Figure 2.11, this page displays two different settings depending on the installa-tion opinstalla-tion. Depending on whether the assigned AS Java is installed on the local developer PC or on any address in the LAN, you must select the options appropriate for the remote installation or the local installation.

Figure 2.11 Information About the SAP Application Server on the Preferences Page

Overview of the SAP NetWeaver Developer Studio

2

Simplified view of AS Java

The ASJavaClusterOverview provides a simple tool for developers to not only display information about the status of the assigned server at any time, but also allows them to control individual process nodes. The view is divided into two windows (Figure 2.12):

왘 The left part of the window in this view contains a tree display of the individual instances and process nodes. Figure 2.12 displays a single-server configuration, to which the process nodes for the ICM and a server process belong. You can use the context menu for the individ-ual tree nodes to perform operations such as starting or stopping a process, or switching to debug mode.

왘 The right part of the window displays the status information for the selected node; for example, whether it is a productive node, the cur-rent status of that node, or whether the user is in debug mode.

Extended view of the AS Java in the administration perspective

The simple cluster display provides a rather limited view of the AS Java and allows developers to perform only certain standard activities on the individual server process nodes. A significantly extended view of the AS Java is available in the Developer Studio with the various application server tools and utilities in the SAP Management Console perspective.

Beginning from the Developer Studio, developers now have access to certain basic functions for monitoring and managing the SAP application server and the associated server instances. In this way, they can control local and remote server processes without reverting to additional tools

Figure 2.12 Cluster Overview as a Fixed Component in the Developer Studio

Integration Platform 2.4

outside of the development environment. In contrast to the standard tools for AS Java system administration, the scope is limited here to a set of basic functions and is tailored more to the requirements of applica-tion developers.

Figure 2.13 shows the representation of a server instance with the assigned nodes and some basic functions in the SAPManagement Con-sole(Tree) view.

General Debugging Process

The integration of the AS Java in the Developer Studio results in the fol-lowing steps for the general debugging process:

1.Check the general requirements for debugging:

Only server process nodes that are not defined for productive use can be switched to debug mode. In a cluster configuration, the relevant node also must have the status Restricted Load Balancing. Only such server processes can be isolated from a cluster.

2.Register the server connection:

To start the application on the server from within the IDE, you must enter the connection data for the AS Java on the Preferences page in the Developer Studio.

Figure 2.13 Using the SAP Management Console to Administrate the AS Java in the Developer Studio

Overview of the SAP NetWeaver Developer Studio

2

3.Activate debugging:

Note that in a cluster configuration, a debug mode remains integrated in the cluster until a debug session is activated for it. Accordingly, choosing ActivateRemoteDebugging means that the relevant debug node is isolated from the cluster. The message service then removes the node from the list of its destinations so that inbound requests can no longer reach the debug node. From the time of the activation, the debug node is no longer involved in the cluster communication and will have to be restarted after the debug session.

In a single-server configuration, the server is stopped when debug-ging is activated and it is reserved only for the debug session.

4.Set the breakpoints:

To better narrow down error situations, you require breakpoints at suitable points in the Java source code.

5.Start debugging:

Based on a debug configuration, you can start the debug session from within the Developer Studio.

General Deployment Process

The process for deploying archives is not the same for all types of projects using the means provided in the Developer Studio. There are different approaches depending on whether the project in question is an SAP-specific or a standard Java project.

Provided that the current instance of the AS Java is active, the following steps can be distinguished:

1. Register the server connection under Windows Preferences in the Developer Studio.

2. Update the project data within the Developer Studio.

3. Generate a transportable archive (EAR, WAR, JAR, RAR, or SDA).

4. Deploy the archive.

Developers can start the actual deployment of the archives in various places. For example, they can deploy SAP-specific components, such as Web Dynpro archives or Dictionary archives, directly from the project view. For standard applications based on Java EE 5 or J2EE 1.4, they

Tools and Perspectives 2.5

generally use the ServersView to launch the Publish function. Further-more, the Developer Studio contains a DeployView that allows develop-ers to deploy both SAP-specific components and Java EE and J2EE archives in the same way.

As shown in Figure 2.14, this tool contains a variety of options and allows developers, for example, to define in advance conditions for pos-sible updates of the archives or behavior in error situations.