Friday, May 29, 2009

Sharing Mechanisms in the VM Container

Purpose

In the VM Container each user session contains its own Java VM, and therefore its own local Java heap (see Resource Management in the VM Container). So data structures must often be created and replicated many times. (Classical Java application servers that work with only one VM do not have this problem.)

Example

A typical example is a large XML configuration file that has to be parsed when the application is started.

For this reason it is best to create data structures that are needed by multiple user sessions once only, and then let all the user sessions share them.

Application Area

This sharing concept combines the robustness and isolation of user sessions in the VM Container with the optimum use of resources and performance. The programming model though is different to the standard Java technology (serialization), and is designed for use with VMC middleware only.

Implementation

The following mechanisms in the VM Container enable sharing across VMs:

Shared class loaders load Java classes into the shared memory.

Shared Closures are instances of shared classes. These Java objects are kept in the shared memory and can be used be all the VMs in the instance. Shared closures can be mappable or copy-only.

Shared Locks are used to synchronize VMs at instance l evel. Access to shared objects can be controlled with shared locks.

Administration

You can display and manage active objects in the VMC System Administration (transaction SM53).

1 comment:

seventyros said...

For a Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP, Visit Learn SAP Online

Blog Archive