Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -52,26 +52,50 @@ local.properties
.buildpath
.target
.tern-project
.texlipse
.springBeans
.recommenders/
.apt_generated/
.apt_generated_test/
.factorypath
.c9/
*.pydevproject
.cproject
.autotools
.externalToolBuilders/
.launches/

# IntelliJ IDEA
.idea/
*.iws
*.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*
42 changes: 32 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<featureManager>
<feature>servlet-6.0</feature>
<feature>jdbc-4.3</feature>
<feature>transportSecurity-1.0</feature>
</featureManager>
```

> **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:
Expand All @@ -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
<featureManager>
<feature>servlet-6.0</feature>
<feature>jdbc-4.3</feature>
<feature>transportSecurity-1.0</feature>
</featureManager>
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
<properties>
<cics.bom.version>6.1-20250812133513-PH63856</cics.bom.version>
</properties>
```

## Building the Sample

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
connection.project.dir=..
eclipse.preferences.version=1
2 changes: 0 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Loading