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
-
Extract the Eci_1PC_Managed.zip file from the
{installed_location}/samples/java/com/ibm/ctg/samples/SpringBoot/Managed/Liberty/1PhaseCommit
location.
- Update the server configurations such as
connectionUrl,
portNumber, and serverName in the server.xml
file.
- Update the location of the cicseci.jakarta.rar file
(/opt/ibm/cicstg/deployable) in the resource adapter configuration section of
the server.xml file.
- Copy cicsjee.jakarta.jar from the installed location
(/opt/ibm/cicstg/classes) and place it in the
/src/main/resources location.
- 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.
- 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