4.1.4 Jolt Client/Server Relationship
Oracle Jolt works in a distributed client/server environment and connects Java clients to Oracle Tuxedo-based applications.
The following figure illustrates the client/server relationship between a Jolt program and the Jolt Server.
Figure 4-1 Jolt Client/Server Relationship

As illustrated in the figure, the Jolt Server acts as a proxy for a native Oracle Tuxedo client, implementing functionality available through the native Oracle Tuxedo client. The Oracle Jolt Server accepts requests from Oracle Jolt clients and maps those requests into Oracle Tuxedo service requests through the Oracle Tuxedo ATMI interface. Requests and associated parameters are packaged into a message buffer and delivered over the network to the Oracle Jolt Server. The Oracle Jolt Connection Manager handles all communication between the Oracle Jolt Server and the Oracle Jolt applet using the Oracle Jolt Transaction Protocol. The Oracle Jolt Server unpacks the data from the message, performs any necessary data conversions, such as numeric format conversions or character set conversions, and makes the appropriate service request to Oracle Tuxedo as specified by the message.
Once a service request enters the Oracle Tuxedo system, it is executed in exactly the same manner as any other Oracle Tuxedo request. The results are returned through the ATMI interface to the Oracle Jolt Server, which packages the results and any error information into a message that is sent to the Oracle Jolt client applet. The Oracle Jolt client then maps the contents of the message into the various Oracle Jolt client interface objects, completing the request.
On the client side, the user program contains the client application code. The Jolt Class Library packages a JoltSession and JoltTransaction, which in turn handle service requests.
The following table describes the client-side requests and Jolt Server-side actions in a simple example program.
Table 4-1 Jolt Client/Server Interaction
Jolt Client | Jolt Server |
---|---|
1 attr=new JoltSessionAttributes();
attr.setString(attr.APPADDRESS,
“//myhost:8000”);
|
Binds the client to the Oracle Tuxedo environment |
2 session=new JoltSession(attr, username,
userRole, userPassword, appPassword);
|
Logs the client onto Oracle Tuxedo |
3 withdrawal=new JoltRemoteService(
servname, session );
|
Looks up the service attributes in the Repository |
4 withdrawal.addString(“accountnumber”,
“123”);
withdrawal.addFloat(“amount”, (float)
100.00);
|
Populates variables in the client (no Jolt Server activity) |
5 trans=new JoltTransaction( time-out,
session);
|
Begins a new Tuxedo transaction |
6 withdrawal.call(trans);
|
Executes the Oracle Tuxedo service |
7 trans.commit() or trans.rollback();
|
Completes or rolls back transaction |
8 balance=withdrawal.getFloatDef(“balance,”
(float) 0.0);
|
Retrieves the results (no Jolt Server activity) |
9 session.endSession();
|
Logs the client off of Oracle Tuxedo |
The following tasks summarize the interaction shown in the previous table, “Jolt Client/Server Interaction.”
- Bind the client to the Oracle Tuxedo environment using the
JoltSessionAttributes
class. - Establish a session.
- Set variables.
- Perform the necessary transaction processing.
- Log the client off of the Oracle Tuxedo system.
Each of these activities is handled through the use of the Jolt Class Library classes. These classes include methods for setting and clearing data and for handling remote service actions. “Jolt Object Relationships” describes the Jolt Class Library classes in more detail.
Parent topic: Class Library Functionality Overview