Entering content frame

Process documentation Starting, Monitoring and Stopping a J2EE Instance Locate the document in its SAP Library structure

Purpose

With the J2EE startup and control framework you can start, monitor, and stop a J2EE instance. This means you can:

·        Restart processes that have crashed

·        Send request to shut instance down

·        Terminate hanging processes

The program Jcontrol is part of the standard delivery.

Process Flow

The following graphic shows the flow of the actions that the J2EE startup and control framework executes.

This graphic is explained in the accompanying text

 

Starting the J2EE Instance

The following steps are involved in starting the J2EE instance:

·        JControl is started (in Windows by the SAP start service; on UNIX platforms by the startsap script).

·        JControl initializes the SAP signal handling to be able to handle signals received.

·        JControl starts JLaunch with the bootstrap.properties file (1). This executes the following steps:

¡        The first argument of JLaunch is the PID of the parent process (JControl). JLaunch starts a thread, which ends the JLaunch process, if the parent process, JControl, fails.

¡        Creates JVM arguments and initializes hosting of the VM.

¡        Loads the VM into its own process, initializes the VM and starts the bootstrap program.

¡        The bootstrap program synchronizes the binary data of the J2EE database with the local file system (2).

¡        The bootstrap program reads the J2EE instance description from the J2EE database and writes the file instance.property (3). The file instance.property contains the description and the arguments of the J2EE cluster elements that are to be started. 

·        JControl reads and creates a list of the J2EE cluster elements to be started (4).

·        JControl starts a JLaunch process for each cluster element (5). This executes the following steps:

¡        The first argument of JLaunch is the PID of the parent process (JControl). JLaunch starts a thread, which ends the JLaunch process, if the parent process, JControl, fails.

¡        Creates JVM arguments and initializes hosting of the VM.

¡        Loads the VM into its own process, initializes the VM and starts the J2EE cluster element. This executes the following steps:

§         Starts the “ offline“ configuration manager to read the properties for the Java Enterprise runtime from the database and to save them in various hash tables (6).

§         Stops the “offline“ configuration manager and starts the Enterprise Java runtime with the saved properties.

§         Starts the service framework and the services.

 

See also:

SAP J2EE Engine System Architecture

 

Monitoring the J2EE Instance

The JControl process monitors the J2EE instance. It continuously checks the status of the cluster elements of the instance and restarts terminated processes.

Stopping the J2EE Instance

Signals and named pipes trigger a J2EE instance to stop. The process ensures that following a shutdown time interval all cluster elements of the instance are exited.

The graphic below shows the communication.

This graphic is explained in the accompanying text

An instance is stopped as follows:

·        The SAP start/stop environment (start script or SAP Start Service on Windows), which started the JControl process, sends a SIGINT to the JControl process (1).

·        JControl sets the status of the J2EE instance to STOPPING in its list and sends a notification using a named pipe to all of the running cluster elements (2).

·        The JLaunch process of the J2EE cluster element must respond to the notification within a defined time interval. (If this soft shutdown does not work, the JLaunch process is completely terminated by JControl.) It triggers the shutdown of the J2EE cluster element in the JVM and waits for its own VM to terminate (3).

·        JControl exits.

 

 

Leaving content frame