Skip to content

Commit

Permalink
Migrate JMS to Jakarta namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Croway authored and avano committed Sep 11, 2023
1 parent e9b83a4 commit 9e19639
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 44 deletions.
2 changes: 1 addition & 1 deletion system-x/services/jms/amq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<artifactId>artemis-jakarta-client</artifactId>
<version>${artemis.jms.client.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

import com.google.auto.service.AutoService;

import javax.jms.Connection;
import javax.jms.JMSException;

import java.util.HashMap;
import java.util.Map;

import jakarta.jms.Connection;
import jakarta.jms.JMSException;

@AutoService(AMQBroker.class)
public class LocalAMQBroker extends AMQBroker implements Deployable, WithDockerImage {
private static final Logger LOG = LoggerFactory.getLogger(LocalAMQBroker.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@

import com.google.auto.service.AutoService;

import javax.jms.Connection;
import javax.jms.JMSException;

import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
Expand All @@ -46,6 +43,8 @@
import io.fabric8.kubernetes.client.dsl.Resource;
import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext;
import io.fabric8.openshift.api.model.Route;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;

@AutoService(AMQBroker.class)
public class OpenshiftAMQBroker extends AMQBroker implements OpenshiftDeployable, WithInClusterHostname, WithExternalHostname, WithOperatorHub,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import software.tnb.jms.amq.account.AMQBrokerAccount;
import software.tnb.jms.amq.validation.AMQValidation;

import javax.jms.Connection;
import jakarta.jms.Connection;

public abstract class AMQBroker extends Service<AMQBrokerAccount, Connection, AMQValidation> {
public abstract String brokerUrl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import software.tnb.jms.client.MQTT5TopicClient;
import software.tnb.jms.client.MQTTTopicClient;

import javax.jms.Connection;

import java.util.UUID;

import jakarta.jms.Connection;

public class AMQValidation implements Validation {
private final Connection connection;
private JMSClientManager client;
Expand Down
6 changes: 3 additions & 3 deletions system-x/services/jms/client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
<name>TNB :: System-X :: Services :: JMS :: Client</name>

<properties>
<jms.api.version>2.0.1</jms.api.version>
<jms.api.version>3.1.0</jms.api.version>
<paho.mqtt.client.version>1.2.5</paho.mqtt.client.version>
<paho.mqtt5.client.version>1.2.5</paho.mqtt5.client.version>
</properties>

<dependencies>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>${jms.api.version}</version>
<scope>compile</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jms.BytesMessage;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;

import java.util.Map;

import jakarta.jms.BytesMessage;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;

public abstract class JMSClient implements BasicJMSOperations<Message> {
private static final Logger LOG = LoggerFactory.getLogger(JMSClient.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package software.tnb.jms.client;

import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Session;

import java.util.HashMap;
import java.util.Map;

import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.Session;

public class JMSClientManager {
private final Connection connection;
private final Map<String, JMSQueueClient> queueClients = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Session;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.Session;

public class JMSQueueClient extends JMSClient {
private static final Logger LOG = LoggerFactory.getLogger(JMSQueueClient.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Session;

import java.util.List;
import java.util.stream.Collectors;

import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.Session;

public class JMSTopicClient extends JMSClient implements TopicClient {
private static final Logger LOG = LoggerFactory.getLogger(JMSTopicClient.class);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package software.tnb.jms.listener;

import javax.jms.Message;
import javax.jms.MessageListener;
import jakarta.jms.Message;
import jakarta.jms.MessageListener;

public class JMSMessageListener extends software.tnb.jms.listener.MessageListener<Message> implements MessageListener {

Expand Down
2 changes: 1 addition & 1 deletion system-x/services/jms/ibm-mq/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</dependency>
<dependency>
<groupId>com.ibm.mq</groupId>
<artifactId>com.ibm.mq.allclient</artifactId>
<artifactId>com.ibm.mq.jakarta.client</artifactId>
<version>${ibm.mq.version}</version>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.ibm.mq.jms.MQConnectionFactory;
import com.ibm.msg.client.wmq.WMQConstants;

import javax.jms.Connection;
import javax.jms.JMSException;
import com.ibm.mq.jakarta.jms.MQConnectionFactory;
import com.ibm.msg.client.jakarta.wmq.WMQConstants;

import java.io.File;
import java.util.Map;

import jakarta.jms.Connection;
import jakarta.jms.JMSException;

public abstract class IBMMQ extends Service<IBMMQAccount, Connection, IBMMQValidation> implements WithDockerImage {
private static final Logger LOG = LoggerFactory.getLogger(IBMMQ.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
import com.ibm.mq.headers.pcf.PCFMessage;
import com.ibm.mq.headers.pcf.PCFMessageAgent;

import javax.jms.Connection;

import java.util.HashSet;
import java.util.Hashtable;
import java.util.Set;

import jakarta.jms.Connection;

public class IBMMQValidation implements Validation {
private final IBMMQAccount account;

Expand Down

0 comments on commit 9e19639

Please sign in to comment.