Skip to content

Commit 4770594

Browse files
authored
Merge pull request #10 from cicsdev/manvi/samples
several changes needed for updating build
2 parents 8aec32f + 95e65ad commit 4770594

8 files changed

Lines changed: 37 additions & 37 deletions

File tree

.github/workflows/java.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
continue-on-error: ${{ matrix.experimental }}
1717
strategy:
18+
strategy:
1819
matrix:
19-
jdk: [8, 11]
20-
experimental: [false]
21-
include:
22-
- jdk: 17
23-
experimental: true
20+
jdk: [17]
2421
steps:
2522
- uses: actions/checkout@v3
2623
- name: Set up JDK ${{ matrix.jdk }}

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The artifact built from this project is a WAR file that can be deployed into CIC
1111

1212
## Prerequisites
1313

14-
- CICS TS V5.3 or later
14+
- CICS TS V6.1 or later
1515
- A configured Liberty JVM server in CICS
16-
- Java SE 1.8 or later on the workstation
16+
- Requires Java 17 or later. on the workstation
1717
- An Eclipse development environment on the workstation (optional)
1818
- Either Gradle or Apache Maven on the workstation (optional if using Wrappers)
1919
- A CICS TSMODEL resource with the attribute `Recovery(ON)` for the TSQ called `EXAMPLE`.
@@ -78,12 +78,12 @@ Run the following in a local command prompt:
7878
On Linux or Mac:
7979

8080
```shell
81-
./gradlew clean bootWar
81+
./gradlew clean build
8282
```
8383
On Windows:
8484

8585
```shell
86-
gradlew.bat clean bootWar
86+
gradlew.bat clean build
8787
```
8888

8989
This creates a WAR file inside the `build/libs` directory.
@@ -109,7 +109,7 @@ This creates a WAR file inside the `target` directory.
109109

110110
## Deploying
111111

112-
Ensure you have the `jsp-2.3` feature (which itself contains `servlet`) configured in `server.xml`:
112+
Ensure you have the `pages-3.1` feature (which itself contains `servlet`) configured in `server.xml`:
113113

114114
Either:
115115
1. Create a CICS bundle project and copy the WAR file into it.
@@ -141,6 +141,7 @@ Or:
141141
1. With the application installed, the root URL for the sample application can be found in messages.log e.g. `http://myzos.mycompany.com:32000/cics-java-liberty-springboot-transactions-0.1.0/`.
142142

143143
2. Visit the URL from the browser to review the 'Usage' guide.
144+
Note: The trailing "/" is required to display the Usage Guide.
144145

145146
3. To demonstrate the `@Transactional` container managed transaction, drive the `/transactionalCommit` end-point. You should see *hello CICS from transactionalCommit()* at the browser and a corresponding entry in the TSQ 'EXAMPLE'. You can browse the contents of the TSQ using the CEBR transaction in CICS.
146147

build.gradle

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins
22
{
3-
id 'org.springframework.boot' version '2.7.0'
3+
id 'org.springframework.boot' version '3.5.9'
44
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
55
id 'java'
66
id 'eclipse'
@@ -23,25 +23,23 @@ eclipse
2323
}
2424

2525

26+
2627
repositories
2728
{
2829
mavenCentral()
2930
}
3031

31-
java
32-
{
33-
toolchain
34-
{
32+
java {
33+
toolchain {
3534
languageVersion = JavaLanguageVersion.of(java_version)
36-
vendor = JvmVendorSpec.IBM
37-
implementation = JvmImplementation.J9
3835
}
3936
}
4037

38+
4139
dependencies
4240
{
4341
// CICS BOM (as of May 2020)
44-
compileOnly enforcedPlatform('com.ibm.cics:com.ibm.cics.ts.bom:5.5-20200519131930-PH25409')
42+
compileOnly enforcedPlatform('com.ibm.cics:com.ibm.cics.ts.bom:6.1-20250812133513-PH63856')
4543

4644
// Don't include JCICS in the final build (no need for version because we have BOM)
4745
compileOnly("com.ibm.cics:com.ibm.cics.server")
@@ -51,15 +49,15 @@ dependencies
5149

5250
// Don't include TomCat in the runtime build
5351
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
54-
55-
// Java Transaction API (this is newer and covers up to jta-1.3) - don't include in the final build
56-
compileOnly ("javax.transaction:javax.transaction-api")
57-
52+
53+
// Java Transaction API - don't include in the final build
54+
compileOnly 'jakarta.transaction:jakarta.transaction-api'
5855
// Spring's Transactional API
5956
implementation ("org.springframework:spring-tx")
6057
}
6158

62-
59+
//Don't generate a FAT bootWar, we don't need to run standalone
60+
bootWar { enabled = false }
6361

6462
publishing {
6563
publications {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# For example: gradle build publish.
1515
publish_repo_releases_url = 'default-value-for-publish_repo_releases_url'
1616
publish_repo_releases_name = 'default-value-for-publish_repo_releases_name'
17-
java_version = 8
17+
java_version = 17
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-rc-1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

pom.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,33 @@
77
<parent>
88
<groupId>org.springframework.boot</groupId>
99
<artifactId>spring-boot-starter-parent</artifactId>
10-
<version>2.7.0</version>
10+
<version>3.5.9</version>
1111
<relativePath/>
1212
</parent>
1313

14+
1415
<!-- Application properties -->
1516
<groupId>com.ibm.cicsdev</groupId>
1617
<artifactId>cics-java-liberty-springboot-transactions</artifactId>
1718
<version>0.1.0</version>
1819
<name>com.ibm.cicsdev.springboot.transactions</name>
1920
<description>Demo project for Spring and Liberty transactions</description>
21+
2022
<properties>
21-
<java.version>1.8</java.version>
22-
23+
<java.version>17</java.version>
2324
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2425
<maven.compiler.target>${java.version}</maven.compiler.target>
25-
<maven.compiler.source>${java.version}</maven.compiler.source>
26+
<maven.compiler.source>${java.version}</maven.compiler.source>
27+
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
2628
</properties>
2729

28-
<!-- CICS BOM (as of May 2020) -->
30+
<!-- CICS TS V6.1 BOM (as of Sept 2024) -->
2931
<dependencyManagement>
3032
<dependencies>
3133
<dependency>
3234
<groupId>com.ibm.cics</groupId>
3335
<artifactId>com.ibm.cics.ts.bom</artifactId>
34-
<version>5.5-20200519131930-PH25409</version>
36+
<version>6.1-20250812133513-PH63856</version>
3537
<type>pom</type>
3638
<scope>import</scope>
3739
</dependency>
@@ -66,8 +68,8 @@
6668

6769
<!-- Compile against, but don't include javax.transaction API -->
6870
<dependency>
69-
<groupId>javax.transaction</groupId>
70-
<artifactId>javax.transaction-api</artifactId>
71+
<groupId>jakarta.transaction</groupId>
72+
<artifactId>jakarta.transaction-api</artifactId>
7173
<scope>provided</scope>
7274
</dependency>
7375

src/main/java/com/ibm/cicsdev/springboot/transactions/JEEUserTransaction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
import javax.naming.InitialContext;
1414
import javax.naming.NamingException;
15-
import javax.transaction.UserTransaction;
15+
16+
import jakarta.transaction.UserTransaction;
1617
import org.springframework.stereotype.Component;
1718
import com.ibm.cics.server.TSQ;
1819

src/main/webapp/WEB-INF/web.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd"
4-
version="3.1">
2+
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
5+
version="6.0">
56
<display-name>cics-java-liberty-springboot-transactions</display-name>
67
<login-config>
78
<auth-method>BASIC</auth-method>

0 commit comments

Comments
 (0)