Java Abstract Datatypes (ADTs)

Java Classes in SQL (JCS) is the method of storing and using Java objects within the Adaptive Server. CIS interaction in this implementation is needed to support Java objects and Java functions on remote servers.

CIS supports JCS on remote Adaptive Server Enterprise version 12.0 or greater.

Objects are passed between the local and remote servers in a serialized format, i.e. a binary representation that is used to re-instantiate the object. CIS treats a serialized object as an image blob, using text and image handling functions to pass objects between servers. The object is re-instantiated on the destination server before processing continues.

When handling queries containing references to Java objects and functions on remote servers, CIS attempts to forward as much syntax as possible to the remote server. Any portion of the query that cannot be passed to the remote server is handled on the local server, requiring the serialization and de-serialization of all necessary remote objects. Due to the overhead associated with serializing and de-serializing the java objects, performance of such queries is significantly less than comparable local access.

To facilitate the interchange of Java objects between servers, CIS issues the command:

set raw_object_serialization ON

to each ASEnterprise server that is Java-enabled. This allows CIS to easily de-serialize the object obtained from the remote site.

Java class definitions

The Java class definitions on the local and remote servers must be compatible to facilitate passing objects between servers. For this reason, CIS assumes that compatibility exists, and any errors in object definition will be detected during de-serialization efforts. Objects are considered compatible if the serialized form of the object on the remote server can be used to successfully instantiate an object on the local server, or vise versa. Also, any Java method referenced in the local server in conjunction with a remotely mapped object must be defined on the remote object as well.

It is the responsibility of the database administrator to ensure that class definitions on local and remote servers are compatible. Incompatible objects and invalid method references will result in de-serialization errors or Java exceptions that will cancel the requesting query.

To improve overall performance, the cis packet size configuration variable should be increased to better facilitate passing serialized objects between servers. Serialized objects are passed between servers with a datatype of image, and can vary in size from a few bytes to 2 gigabytes.