Skip to content

Commit

Permalink
Upgrade IBM JMS Client to 9.4.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Sep 13, 2024
1 parent 9088f03 commit 194f09a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
*/
package org.apache.camel.quarkus.component.jms.ibmmq.support;

import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Map;

import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
import org.apache.commons.io.FileUtils;
import org.eclipse.microprofile.config.ConfigProvider;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.images.builder.Transferable;
import org.testcontainers.utility.DockerImageName;

public class IBMMQTestResource implements QuarkusTestResourceLifecycleManager {
Expand All @@ -36,7 +33,6 @@ public class IBMMQTestResource implements QuarkusTestResourceLifecycleManager {
private static final String PASSWORD = "passw0rd";
private static final String MESSAGING_CHANNEL = "DEV.APP.SVRCONN";
private static final String MQSC_COMMAND_FILE_NAME = "99-auth.mqsc";
private static final String MQSC_FILE = "target/" + MQSC_COMMAND_FILE_NAME;
private static final String MQSC_FILE_CONTAINER_PATH = "/etc/mqm/" + MQSC_COMMAND_FILE_NAME;

private GenericContainer<?> container;
Expand All @@ -48,9 +44,10 @@ public Map<String, String> start() {
.withExposedPorts(PORT)
.withEnv(Map.of(
"LICENSE", System.getProperty("ibm.mq.container.license"),
"MQ_QMGR_NAME", QUEUE_MANAGER_NAME,
"MQ_APP_PASSWORD", PASSWORD))
.withFileSystemBind(mqscConfig(), MQSC_FILE_CONTAINER_PATH)
"MQ_QMGR_NAME", QUEUE_MANAGER_NAME))
.withCopyToContainer(Transferable.of(PASSWORD), "/run/secrets/mqAdminPassword")
.withCopyToContainer(Transferable.of(PASSWORD), "/run/secrets/mqAppPassword")
.withCopyToContainer(Transferable.of(mqscConfig()), MQSC_FILE_CONTAINER_PATH)
// AMQ5806I is a message code for queue manager start
.waitingFor(Wait.forLogMessage(".*AMQ5806I.*", 1));
container.start();
Expand Down Expand Up @@ -85,15 +82,8 @@ public void inject(TestInjector testInjector) {
* @return mqsc config string
*/
private String mqscConfig() {
final String content = "SET AUTHREC PROFILE('*') PRINCIPAL('" + USER + "') OBJTYPE(TOPIC) AUTHADD(ALL)\n"
return "SET AUTHREC PROFILE('*') PRINCIPAL('" + USER + "') OBJTYPE(TOPIC) AUTHADD(ALL)\n"
+ "SET AUTHREC PROFILE('*') PRINCIPAL('" + USER + "') OBJTYPE(QUEUE) AUTHADD(ALL)\n"
+ "SET AUTHREC PROFILE('SYSTEM.DEFAULT.MODEL.QUEUE') OBJTYPE(QUEUE) PRINCIPAL('" + USER + "') AUTHADD(ALL)";
File targetFile = new File(MQSC_FILE);
try {
FileUtils.writeStringToFile(targetFile, content, Charset.defaultCharset());
} catch (IOException e) {
throw new RuntimeException("Unable to write to file", e);
}
return targetFile.getAbsolutePath();
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<hapi-fhir.version>${hapi-fhir-version}</hapi-fhir.version>
<hapi-fhir-core.version>6.1.2.2</hapi-fhir-core.version><!-- @sync ca.uhn.hapi.fhir:hapi-fhir:${hapi-fhir.version} prop:fhir_core_version -->
<httpclient5.version>${httpclient-version}</httpclient5.version><!-- Saxon and Wiremock -->
<ibm.mq.client.version>9.3.2.1</ibm.mq.client.version>
<ibm.mq.client.version>9.4.0.5</ibm.mq.client.version>
<icu4j.version>${icu4j-version}</icu4j.version>
<immutables.version>2.9.3</immutables.version>
<influxdb.version>${influx-java-driver-version}</influxdb.version>
Expand Down Expand Up @@ -238,7 +238,7 @@
<google-storage.container.image>docker.io/fsouza/fake-gcs-server:1.47.3</google-storage.container.image>
<greenmail.container.image>docker.io/greenmail/standalone:2.0.0</greenmail.container.image>
<hashicorp-vault.container.image>docker.io/hashicorp/vault:1.17</hashicorp-vault.container.image>
<ibm-mq.container.image>icr.io/ibm-messaging/mq:9.3.2.1-r1</ibm-mq.container.image>
<ibm-mq.container.image>icr.io/ibm-messaging/mq:9.4.0.5-r1</ibm-mq.container.image>
<influxdb.container.image>docker.io/influxdb:1.8.10</influxdb.container.image>
<kafka.container.image>quay.io/strimzi-test-container/test-container:latest-kafka-3.8.0</kafka.container.image>
<kafka-oauth.container.image>quay.io/strimzi/kafka:latest-kafka-3.7.0</kafka-oauth.container.image>
Expand Down
2 changes: 1 addition & 1 deletion poms/bom/src/main/generated/flattened-full-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6548,7 +6548,7 @@
<dependency>
<groupId>com.ibm.mq</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>com.ibm.mq.jakarta.client</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>9.3.2.1</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>9.4.0.5</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
Expand Down
2 changes: 1 addition & 1 deletion poms/bom/src/main/generated/flattened-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6548,7 +6548,7 @@
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.jakarta.client</artifactId>
<version>9.3.2.1</version>
<version>9.4.0.5</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6548,7 +6548,7 @@
<dependency>
<groupId>com.ibm.mq</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>com.ibm.mq.jakarta.client</artifactId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>9.3.2.1</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>9.4.0.5</version><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId><!-- org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
Expand Down

0 comments on commit 194f09a

Please sign in to comment.