Configuring a one-phase commit on Liberty in managed mode

This example explains the steps to configure a one-phase commit on Liberty using the provided Spring Boot samples, in managed mode.

About this task

When you execute the sample, it downloads the latest Liberty using the Maven plug-in and deploys the Spring Boot application along with resource adapter that is configured with the sample.

To execute the Spring Boot sample:

Procedure

  1. Extract the Eci_1PC_Managed.zip file from the {installed_location}/samples/java/com/ibm/ctg/samples/SpringBoot/Managed/Liberty/1PhaseCommit location.
  2. Update the server configurations such as connectionUrl, portNumber, and serverName in the server.xml file.
  3. Update the location of the cicseci.jakarta.rar file (/opt/ibm/cicstg/deployable) in the resource adapter configuration section of the server.xml file.
  4. Copy cicsjee.jakarta.jar from the installed location (/opt/ibm/cicstg/classes) and place it in the /src/main/resources location.
  5. Execute the command ./mvnw clean package liberty:run.
    This command compiles the source code and creates the Spring Boot jar. This jar is then deployed in the embedded Liberty and exposed to the default port 9080.
  6. Go to http://localhost:9080/transactionalcommit.
    Program EC01 gets executed at the CICS server and the time stamp is returned as the output. If the request is received successfully, the following message is displayed:
    Response received from CICS server is : 21/05/24 05:15:48