Jolt 1.2 Developer's Guide

Jolt Class Functionality
Jolt classes are used to perform the basic functions of transaction processing: log on/log off, synchronous service calling, transaction begin, commit,
rollback and subscribe to events or unsolicited messages. The following sections describe how the Jolt classes are used to perform these functions.
Logon/Logoff
The client application must log on to the NonStop
TM
TUXEDO environment before initiating any transaction activity. The Jolt Class Library
provides the JoltSessionAttributes class and JoltSession class to establish a connection to a NonStop
TM
TUXEDO System.
The JoltSessionAttributes class is used to contain the connection properties to a Jolt/ NonStop
TM
TUXEDO system and contains various properties
about the Jolt/ NonStop
TM
TUXEDO System. To establish a connection, the client application must create an instance of the JoltSession class. This
instance is the JoltSession object. By instantiating a JoltSession object, users log on to Jolt/ NonStop
TM
TUXEDO or log off by calling the
endSession method.
Synchronous Service Calling
Transaction activities such as requests and replies are handled by a JoltRemoteService object (an instance of the JoltRemoteService class). Each
JoltRemoteService object refers to an exported NonStop
TM
TUXEDO request/reply service. The programmer must provide a service name and a
JoltSession object to instantiate a JoltRemoteService object before it can be used.
To use a JoltRemoteService object, the programmer:
Sets the input parameters.
Invokes the service.
Examines the output parameters.
For efficiency, Jolt does not make a copy of any input parameter object; only the references to the object (for example, string and byte array) are
saved. Since JoltRemoteService object is a stateful object, its input parameters and the request attributes are retained throughout the life of the
object. You can use the clear() method to reset the attributes and input parameters, before reusing the JoltRemoteService object.
Since Jolt is designed for a multithreaded environment, multiple JoltRemoteService objects can be invoked simultaneously by using Java's
multithreading capability. Refer to Multithreaded Applications for more information.
Transaction Begin, Commit, and Rollback
In Jolt, a transaction is represented as an object of the class JoltTransaction. The transaction begins when the transaction object is instantiated. The
transaction object is created with a time out and JoltSession object parameter: