4.3.2 Synchronous Service Calling
Transaction activities such as requests and replies are handled through a JoltRemoteService object (an instance of the JoltRemoteService class). Each JoltRemoteService object refers to an exported Oracle Tuxedo request/reply service. You must provide a service name and a JoltSession object to instantiate a JoltRemoteService object before it can be used.
To use a JoltRemoteService object:
- Set the input parameters.
- Invoke the service.
- Examine 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. Because 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.
Because Jolt is designed for a multithreaded environment, you can invoke multiple JoltRemoteService objects simultaneously by using the Java multithreading capability. Refer to “Multithreaded Applications” on page 4‑35 for additional information.
Parent topic: Jolt Class Library Walkthrough