Objects

Objects are instances of classes. There can be any number of objects or instances in a class. Each object has a unique identity and its own attributes.

As standard, objects have the same priority in the data area of an DS:ABEN.INTERNAL_SESSION_GLOSRY>internal session. This means that objects can only be accessed from within an internal session.

For transaction-independent objects, shared objects have been introduced for release 6.40, which can be accessed by all programs of an application server at the same time.

In release 6.10, Object Services were introduced for handling persistent objects in the database. These link the attributes of objects with the content of database tables and can execute object-oriented transactions.

Creating Objects

If you want to create an object, you need an object reference variable that can point to the desired class.

Access to Instance Components

A program can access the visible instance components of an object only through references in reference variables. For the syntax, see Accessing Components of Classes.

Lifetime of Objects

An object lives as long as the internal session in which it is used. An object is used so long as at least one reference to it exists or at least one method of the object is registered as an event handler.

As soon as there are no lnoger any references to the object, and none of its methods are registered any longer as event handlers, the object can be deleted by automatic storage management (garbage collection). This releases the identity of the object. This can then be assigned to a new object.