Samples
The sample source code and the associated executable programs for Transaction Server client functions are provided with Transaction Server. These files are located in the transaction-server/samples subdirectory. The files that you need are provided in the FTM artifacts pod and must be downloaded from the pod. For more information about getting files from the artifacts container for your offering, see Getting the files from the artifacts container for your FTM offering.
One Java™ sample client application is included.
| Sample name | Language | Description |
|---|---|---|
ClientItemRead |
Java |
To run Java samples, the directory with the Transaction Server SDK JAR files must be in the Java class path.
ClientItemRead sample uses remote method invocation (RMI) to communicate with the
Transaction Server. Security for RMI is done by using SSL, which needs more classes to be in the
class path. The following JAR files can be copied from the WebSphere® Application Server
Liberty that is installed.
The actual names of the files to add to the class path have version numbers in them. - com.ibm.ws.logging.jar
- com.ibm.ws.ssl.jar
For more information about creating RMI client applications, see Java RMI client application development.
To display help for any of the sample programs, at the command prompt type the executable name and pass a question mark as the only parameter.
If you run the client application outside the Red Hat® OpenShift® cluster, you need to connect the RMI server to the Transaction Server pod from outside the cluster. For more information, see Connect an RMI client to the /share/artifacts/config/check/transaction-server from outside the cluster.