Skip to content

Commit 287a5be

Browse files
committed
Update for MQ 9.4.0
1 parent e54eedb commit 287a5be

File tree

18 files changed

+238
-114
lines changed

18 files changed

+238
-114
lines changed

CHANGES.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Changelog
22
Newest updates are at the top of this file
33

4+
## 3.3.1 (2024-06-20)
5+
- Update Spring dependencies
6+
- Update to MQ 9.4.0.0
7+
- Add "sslCertificateValPolicy" property
8+
- Add samples s4,s4a showing JTA/XA and configuration multiple connections
9+
410
## 3.2.4 (2024-04-02)
511
- Update Spring dependencies
612

@@ -14,8 +20,8 @@ Newest updates are at the top of this file
1420

1521
## 2.7.18 and 3.2.1 (2024-01-10)
1622
- Update Spring dependencies
17-
NOTE: Spring Boot 2 has now reached its end of non-commercial service life.
18-
So this will be the last update based on Spring 2. Further updates will
23+
NOTE: Spring Boot 2 has now reached its end of non-commercial service life.
24+
So this will be the last update based on Spring 2. Further updates will
1925
follow the Spring 3 path only.
2026

2127
## 2.7.17 and 3.1.5 (2023-10-20)
@@ -57,13 +63,13 @@ Newest updates are at the top of this file
5763

5864
## 2.7.6 and 3.0.0 (2022-11-24)
5965
- Update dependencies to Spring Boot 2.7.6/3.0.0
60-
- Add "ibm.mq.jks.*" attributes to set keystore/truststore
66+
- Add "ibm.mq.jks.*" attributes to set keystore/truststore
6167
environment variables instead of using -D command line flags
6268

6369
## 2.7.5 and 0.3.0-RC1 (2022-10-20)
6470
- Update dependencies to Spring Boot 2.7.5/3.0.0-RC1
6571
- Add "ibm.mq.autoConfigure" property to permit disabling bean (#86)
66-
- Spring 3 no longer uses spring.factories for AutoConfiguration
72+
- Spring 3 no longer uses spring.factories for AutoConfiguration
6773

6874
## 2.7.4 and 0.3.0-M5 (2022-09-23)
6975
- Update dependencies to Spring Boot 2.7.4/3.0.0-M5
@@ -82,13 +88,13 @@ Newest updates are at the top of this file
8288
but both names work
8389

8490
## 2.6.7 (2022-04-22)
85-
- Update dependencies to Spring Boot 2.6.7
91+
- Update dependencies to Spring Boot 2.6.7
8692

8793
## 2.6.6.1 (2022-04-02)
88-
- Correct a dependency
94+
- Correct a dependency
8995

9096
## 2.6.6 (2022-04-01)
91-
- Update dependencies to Spring Boot 2.6.6
97+
- Update dependencies to Spring Boot 2.6.6
9298

9399
## 2.6.5 (2022-03-25)
94100
- Update dependencies to Spring Boot 2.6.5

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ NOTE: Spring Boot 2 has now reached its end of non-commercial service life.
1010
So version 2.7.18 is the last update based on Spring 2. Further updates will
1111
follow the Spring 3 path only. If you want to continue to use Spring 2 with future versions of the MQ jars,
1212
then overriding the version inherited from the mq-jms-spring-boot in your parent pom.xml should be possible.
13-
However, this would not give easy access via configuration to any new features available in the MQ client.
13+
However, this would not give easy access via configuration to any new features available in the MQ client.
1414

1515
## Installation and Usage
1616

@@ -21,7 +21,7 @@ mechanism and has tasks that can push compiled jars to either a local repository
2121
Maven Central. When signing/authentication of modules is required, use the `gradle.properties.template` file as a
2222
starter for your own `gradle.properties`.
2323

24-
Java 17 is required as the compiler level when building this package, as that is the baseline for Spring 3.
24+
Java 17 is required as the compiler level when building this package, as that is the baseline for Spring 3.
2525

2626
### Spring Boot Applications
2727

@@ -71,8 +71,8 @@ IBM MQ for Developers container which runs the server processes.
7171
The default options have been selected to match the
7272
[MQ container](https://github.com/ibm-messaging/mq-container) development configuration.
7373

74-
This means that you can run a queue manager using that environment and connect to it without special
75-
configuration.
74+
This means that you can run a queue manager using that environment and connect to it without special
75+
configuration.
7676

7777
This script will run the container on a Linux system.
7878

@@ -201,6 +201,7 @@ We also have
201201
| --------------------------- | ------------------------------------------------------------------------------- |
202202
| ibm.mq.sslFIPSRequired | Force FIPS-compliant algorithms to be used (default false) |
203203
| ibm.mq.sslKeyResetCount | How many bytes to send before resetting the TLS keys |
204+
| ibm.mq.sslCertificateValPolicy | If "none", do not check the server certificate is trusted |
204205

205206
and
206207

@@ -211,7 +212,7 @@ and
211212
| ibm.mq.jks.keyStore | Where is the keystore with a personal key and certificate |
212213
| ibm.mq.jks.keyStorePassword | Password for the keyStore |
213214

214-
These JKS options are an alternative to setting the `javax.net.ssl` system properties, usually done on the command line.
215+
These JKS options are an alternative to setting the `javax.net.ssl` system properties, usually done on the command line.
215216

216217
An alternative preferred approach for setting the key/truststores is available from Spring 3.1, which introduced the
217218
concept of "SSL Bundles". This makes it possible to have different SSL configurations - keystores, truststores etc - for

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ subprojects {
3737
apply plugin: 'signing'
3838

3939
// This is the MQ client version
40-
ext.mqVersion = '9.3.5.0'
40+
ext.mqVersion = '9.4.0.0'
4141
ext.mqGroup = 'com.ibm.mq'
4242

4343
// The groupid for the compiled jars when uploaded

jms3.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
ext {
33
// Our shipped version - should usually match the Spring Boot Version but
44
// there may be reasons to make it different
5-
mqStarterVersion = '3.2.4'
5+
mqStarterVersion = '3.3.1'
66

77
// Direct Dependencies - give versions here
8-
springVersion = '6.1.5'
9-
springBootVersion = '3.2.4'
8+
springVersion = '6.1.10'
9+
springBootVersion = '3.3.1'
1010

11-
pooledJmsVersion = '3.1.4'
11+
pooledJmsVersion = '3.1.6'
1212
jUnitVersion = '4.13.2'
1313

1414
// MQ client has a 'jakarta' name

mq-jms-spring-boot-starter/src/main/java/com/ibm/mq/spring/boot/MQConfigurationProperties.java

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ public MQConfigurationProperties() {
211211
* The reset count of the SSL key.
212212
*/
213213
private int sslKeyResetCount = -1;
214+
215+
/**
216+
* Certificate Validation Policy. When "NONE", this allows connection
217+
* without checking if the server's cert is known/trusted. The mqclient.ini
218+
* file is spelled this way: "CertificateValPolicy" in the SSL stanza.
219+
*/
220+
private String sslCertificateValPolicy = "";
214221

215222
/**
216223
* The key to the SSL Bundle attributes available from Spring Boot 3.1
@@ -448,6 +455,22 @@ public void setSslFIPSRequired(boolean sslFIPSRequired) {
448455
this.sslFIPSRequired = sslFIPSRequired;
449456
}
450457

458+
public String getSslCertificateValPolicy() {
459+
return this.sslCertificateValPolicy;
460+
}
461+
462+
public void setSslCertificateValPolicy(String sslCertificateValPolicy) {
463+
this.sslCertificateValPolicy = sslCertificateValPolicy;
464+
}
465+
466+
public boolean isSslCertificateValidationNone() {
467+
boolean rc = false;
468+
if (this.sslCertificateValPolicy != null && this.sslCertificateValPolicy.equalsIgnoreCase("none")) {
469+
rc = true;
470+
}
471+
return rc;
472+
}
473+
451474
public int getSslKeyResetCount() {
452475
return sslKeyResetCount;
453476
}
@@ -651,6 +674,7 @@ public void traceProperties() {
651674
logger.trace("sslCipherSuite : {}", getSslCipherSuite());
652675
logger.trace("sslKeyresetcount: {}", getSslKeyResetCount());
653676
logger.trace("sslPeerName : {}", getSslPeerName());
677+
654678
logger.trace("sslBundle : {}", getSslBundle());
655679

656680
logger.trace("tempModel : {}", getTempModel());
@@ -665,6 +689,7 @@ public void traceProperties() {
665689
logger.trace("token set : {}", (getToken() != null && getToken().length() > 0) ? "YES" : "NO");
666690

667691
logger.trace("sslFIPSRequired : {}", isSslFIPSRequired());
692+
logger.trace("sslCertValPolicy : \'{}\'", getSslCertificateValPolicy());
668693
logger.trace("useIBMCipherMappings : {}", isUseIBMCipherMappings());
669694
logger.trace("userAuthenticationMQCSP: {}", isUseAuthenticationMQCSP());
670695
logger.trace("outboundSNI : \'{}\'", getOutboundSNI());
@@ -677,12 +702,17 @@ public void traceProperties() {
677702
logger.trace("jndiCF : {}", getJndi().getProviderContextFactory());
678703
logger.trace("jndiProviderUrl : {}", getJndi().getProviderUrl());
679704

680-
String pw = getJks().getKeyStorePassword();
681-
logger.trace("JKS keystore : {}", getJks().getKeyStore());
682-
logger.trace("JKS keystore pw set : {}", (pw != null && pw.length() > 0) ? "YES" : "NO");
683-
pw = getJks().getTrustStorePassword();
684-
logger.trace("JKS truststore : {}", getJks().getTrustStore());
685-
logger.trace("JKS truststore pw set : {}", (pw != null && pw.length() > 0) ? "YES" : "NO");
705+
if (U.isNullOrEmpty(getSslBundle())) {
706+
String pw = getJks().getKeyStorePassword();
707+
logger.trace("JKS keystore : {}", getJks().getKeyStore());
708+
logger.trace("JKS keystore pw set : {}", (pw != null && pw.length() > 0) ? "YES" : "NO");
709+
pw = getJks().getTrustStorePassword();
710+
logger.trace("JKS truststore : {}", getJks().getTrustStore());
711+
logger.trace("JKS truststore pw set : {}", (pw != null && pw.length() > 0) ? "YES" : "NO");
712+
}
713+
else {
714+
logger.trace("JKS key/truststore overridden by sslBundle");
715+
}
686716

687717
if (additionalProperties.size() > 0) {
688718
for (String s : additionalProperties.keySet()) {

0 commit comments

Comments
 (0)