Configuring a one-phase commit on Liberty in nonmanaged mode

This example explains the steps to configure a one-phase commit on Liberty using the provided Spring Boot samples, in non 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. In this case, the ccf2.jakarta.jar file is used for connection management.

To execute the Spring Boot sample:

Procedure

  1. Extract the Eci_1PC_Non_Managed.zip file from the {installed_location}/samples/java/com/ibm/ctg/samples/SpringBoot/Non-Managed/Liberty/1PhaseCommit location.
  2. Update the server configurations such as connectionUrl, portNumber, and serverName in ECIService.java.
  3. Copy the cicsjee.jakarta.jar, ccf2.jakarta.jar, ctgserver.jar, and ctgclient.jar files from the installed location (/opt/ibm/cicstg/classes) and place them in the /src/main/resources location.
  4. 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.
  5. 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