Entering content frame

Background documentation Life Cycle of Active Applications (Handlers) Locate the document in its SAP Library structure

Java applications are objects that can run in an application server instance with an active VM Container.

Incoming requests are processed by processing routines known as handlers. When the application server receives a request, it must find the associated handler and activate the application the handler belongs to. In addition, obsolete applications must be deactivated so that resources are not being used unnecessarily.

Activations and Activation Groups

Activation

Activation means that an application is active in the application server and can be executed. For the application server an activation is a unit consisting of the following elements:

     Identification (ID) - unique across instances

     Name of component

     URL of the component source code; this URL uniquely identifies the stored component.

     Class loader: The class loader is a shared class loader, and loads classes and files from the component.  

     Resources: Registration of all resources requested during the lifespan of the component.

     Bindings: All the bindings of the component

A component is activated as a unit, single modules of a component cannot be activated. This is referred to as component activation.

An activation can be assigned to several activation groups.

Activation Group

An activation group is a set of component activations. Only one version of a component may exist in the activation group. Consequently, the activation group includes precisely one version of an application, which means that users cannot be using different versions of an application at the same time.

An activation group is assigned to one session only (see Structure linkDisplaying and Managing Sessions). A session contains its own activation group as well as other session information.

For the application server an activation group is an object consisting of the following elements:

     Identification (ID), unique across instances

     Session ID

     Set of activations (see above)

Sessions determine the lifespan of activations. If an incoming request belongs to an existing session and the handler selected for processing the request belongs to an activation, this activation of the corresponding component is included in the activation group of the session. For each component the application server has precisely one activation. When a new version of a component is activated, the reference to the deleted activation is deleted. Once all the sessions to which the obsolete activation is mapped are stopped, the activation is stopped and deleted. This frees up the associated resources (loaded Java classes, class loader).

Overview of Activations and Activation Groups

In the Structure linkVMC System Administration you can get an overview of all instances by choosing Structure linkDisplay Applications.

Component Repository

A component repository, identified by its URL, provides the following services:

     Access to components

     Bindings lookup

The repository always supplies the latest version of the component or binding.

The component has the following attributes:

     Component name

     URL of the component source text for loading classes

     Time stamp

     Set of all bindings

Component repositories may be based on databases or on file systems.

The application server can be configured to use just one or multiple component repositories. The standard configuration is one repository based on a database.

Request Handler Lookup

When the application server receives a request, the dispatcher knows whether it is an RFC or HTTP request, and forwards the request to the appropriate layer. This triggers the mapping of a VM to a work process (see Resource Management in the VM Container).

The processing layer is dependent on the request type, and ascertains the request key. With RFC requests this is the name of the function called, with HTTP requests this is part of the path. The handler lookup determines the handler that processes this request. If no handler is found, a default handler is used.

Resource Management

During the lifespan of an activation the application code requires diverse resources, for instance, the cache. These resources are registered in the activation as soon as they are required, and released at the latest when the activation has stopped.

Deleting an Activation

Once an activation is no longer referenced, the corresponding Java application is deactivated. The resources are returned, the shared closures and their related application data are deleted, and the activation is deleted from the shared memory. The shared garbage collector removes the shared class loader as soon as it and other objects of classes it loaded are no longer referenced in any VM belonging to this instance. For more information about the shared GC see Functions of the Shared Garbage Collector.

 

 

Leaving content frame