diff --git a/.gitignore b/.gitignore index 109895d..952e004 100644 --- a/.gitignore +++ b/.gitignore @@ -26,16 +26,16 @@ gradle-app.setting *.zip *.tar.gz *.rar +hs_err_pid* +replay_pid* # Gradle wrapper — these exceptions MUST come after *.jar above. # Git applies the LAST matching rule, so an exception placed before *.jar is silently overridden. !gradle/wrapper/gradle-wrapper.jar !gradle/wrapper/gradle-wrapper.properties -hs_err_pid* -replay_pid* # Eclipse -# CRITICAL: DO NOT ignore .project, .classpath, or .settings/ +# CRITICAL: For multi-module projects, DO NOT ignore .project, .classpath, or .settings/ # These files MUST be committed for clean customer import experience .metadata bin/ @@ -52,10 +52,18 @@ local.properties .buildpath .target .tern-project +.texlipse .springBeans +.recommenders/ .apt_generated/ .apt_generated_test/ .factorypath +.c9/ +*.pydevproject +.cproject +.autotools +.externalToolBuilders/ +.launches/ # IntelliJ IDEA .idea/ @@ -63,15 +71,31 @@ local.properties *.iml *.ipr out/ +.idea_modules/ # VS Code .vscode/ +*.code-workspace +.history/ # macOS .DS_Store .AppleDouble +.LSOverride +Icon ._* # Windows Thumbs.db ehthumbs.db +*.stackdump +[Dd]esktop.ini +$RECYCLE.BIN/ +*.lnk + +# Linux +*~ +.fuse_hidden* +.directory +.Trash-* +.nfs* diff --git a/README.md b/README.md index a707b42..b15fdc1 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,22 @@ This sample demonstrates a Spring Boot JDBC application that connects to IBM Db2 - Either Gradle or Apache Maven on the workstation (optional — wrappers are provided) - Eclipse with IBM CICS Explorer SDK (optional — for Eclipse import and bundle export) +### Liberty server configuration + +Add the following features to your Liberty `server.xml`: + +```xml + + servlet-6.0 + jdbc-4.3 + transportSecurity-1.0 + +``` + +> **Note:** `cicsts:core-1.0` (and the `transaction-2.0` it provides) is automatically injected by CICS in integrated Liberty mode — you do not need to add it. + +Add two `dataSource` definitions — one for type 2 and one for type 4 connectivity. A sample `server.xml` is provided in [`etc/config/liberty/server.xml`](etc/config/liberty/server.xml). Substitute your Db2 connection details before deploying. + ## Downloading Clone the repository using your IDE's Git support, or download as a ZIP: @@ -47,21 +63,27 @@ git clone https://github.com/cicsdev/cics-java-liberty-springboot-jdbc-multi.git > **Tip:** Eclipse Git provides an **Import existing Projects** checkbox when cloning a repository. -## Check dependencies +### Check dependencies -Add the following features to your Liberty `server.xml`: +Before building this sample, verify that the correct CICS TS bill of materials (BOM) is specified for your target release of CICS. The BOM specifies a consistent set of artifacts and their scopes. The default version in this sample is compatible with CICS TS V6.1 with JCICS APAR PH63856 or newer — update it to match your CICS TS release. -```xml - - servlet-6.0 - jdbc-4.3 - transportSecurity-1.0 - +You can browse the published versions of the CICS BOM at [Maven Central](https://mvnrepository.com/artifact/com.ibm.cics/com.ibm.cics.ts.bom). + +The BOM version is defined once, as the `cics.bom.version` property, in `gradle.properties` (Gradle) and in the root `pom.xml` (Maven): + +Gradle (`gradle.properties`): + +```properties +cics.bom.version=6.1-20250812133513-PH63856 ``` -> **Note:** `cicsts:core-1.0` (and the `transaction-2.0` it provides) is automatically injected by CICS in integrated Liberty mode — you do not need to add it. +Maven (`pom.xml`): -Add two `dataSource` definitions — one for type 2 and one for type 4 connectivity. A sample `server.xml` is provided in [`etc/config/liberty/server.xml`](etc/config/liberty/server.xml). Substitute your Db2 connection details before deploying. +```xml + + 6.1-20250812133513-PH63856 + +``` ## Building the Sample diff --git a/cics-java-liberty-springboot-jdbc-multi-app/.settings/org.eclipse.buildship.core.prefs b/cics-java-liberty-springboot-jdbc-multi-app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/cics-java-liberty-springboot-jdbc-multi-app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/cics-java-liberty-springboot-jdbc-multi-cicsbundle/.settings/org.eclipse.buildship.core.prefs b/cics-java-liberty-springboot-jdbc-multi-cicsbundle/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/cics-java-liberty-springboot-jdbc-multi-cicsbundle/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3b26593..77a7214 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.7-bin.zip -networkTimeout=10000 -validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists