Page 1 of 1

What are Lifecycle Objects?

PostPosted: Thu Sep 16, 2010 10:40 am
by Development@SIB
A lifecycle object is basically a container for any objects and methods/actions that are administered on the server side. Lifecycle objects are used to provide business logic to the client.

Each lifecycle object has a predefined life cycle. When the cycle ends, the object is discarded along with all other objects it administers. This process optimizes the application serverĀ“s memory usage.

The following graph gives an overview of the life cycles within an application:

lifecycle_objects.png
lifecycle_objects.png (57.61 KiB) Viewed 2193 times

The example shows two different applications (Application-A and Application-B), which successively access the serverĀ“s business logic.

Each application requires a MasterConnection to access the server. Using the MasterConnection the business logic can be accessed using calls.

The respective lifecycle object is instantiated at the first call of a connection, so the call can be assigned to the correct business object. The lifecycle object remains in place until the respective connection is closed. At this time all administered objects are discarded and the used memory is freed.

SubConnections behave the same way as MasterConnections.

The applications business object is an exception. It is a lifecycle object that is instantiated at the first call of an application and that remains in place until the application server is stopped. Only one applications lifecycle object exists per application, regardless of how many users are registered with the application.


Note

A lifecycle object should be used Stateless, as the Server die lifecycle objecte bei Bedarf neu instanzieren kann. This means that all saved information/objects are discarded!

This behavior has to be considered for user-defined objects, but does not mean that stateful objects are not supported.