Jolt 1.2 Developer's Guide

1
attr=new JoltSessionAttributes();
attr.setString( attr.APPADDRESS, "//myhost:8000" );
Binds the client to the
NonStop
TM
TUXEDO
environment
2
session=new JoltSession( attr, username, userRole, userPassword, appPassword );
Logs the client on to
NonStop
TM
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
NonStop
TM
TUXEDO
transaction
6
withdrawal.call( trans );
Executes the
NonStop
TM
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
NonStop
TM
TUXEDO
The following tasks summarize the interaction shown in Table 6-1 and are the steps involved in beginning a transaction:
Bind the client to the NonStop
TM
TUXEDO environment using the JoltSessionAttributes class.1.
Establish a session.2.
Set variables.3.