mirror of https://github.com/apache/activemq.git
[AMQ-9239] jakarta.jms - activemq-mqtt changes
This commit is contained in:
parent
d83d2f5e18
commit
64cbba0417
|
@ -71,14 +71,14 @@
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.transaction</groupId>
|
||||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
<artifactId>jakarta.transaction-api</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>jakarta.annotation</groupId>
|
||||||
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
<artifactId>jakarta.annotation-api</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.geronimo.specs</groupId>
|
<groupId>org.apache.geronimo.specs</groupId>
|
||||||
|
|
|
@ -24,9 +24,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.zip.DataFormatException;
|
import java.util.zip.DataFormatException;
|
||||||
import java.util.zip.Inflater;
|
import java.util.zip.Inflater;
|
||||||
|
|
||||||
import javax.jms.InvalidClientIDException;
|
import jakarta.jms.InvalidClientIDException;
|
||||||
import javax.jms.JMSException;
|
import jakarta.jms.JMSException;
|
||||||
import javax.jms.Message;
|
import jakarta.jms.Message;
|
||||||
import javax.security.auth.login.CredentialException;
|
import javax.security.auth.login.CredentialException;
|
||||||
|
|
||||||
import org.apache.activemq.broker.BrokerService;
|
import org.apache.activemq.broker.BrokerService;
|
||||||
|
|
|
@ -19,7 +19,7 @@ package org.apache.activemq.transport.mqtt;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.zip.DataFormatException;
|
import java.util.zip.DataFormatException;
|
||||||
|
|
||||||
import javax.jms.JMSException;
|
import jakarta.jms.JMSException;
|
||||||
|
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
import org.apache.activemq.command.ActiveMQMessage;
|
import org.apache.activemq.command.ActiveMQMessage;
|
||||||
|
|
|
@ -20,7 +20,7 @@ import java.io.IOException;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
import javax.jms.JMSException;
|
import jakarta.jms.JMSException;
|
||||||
|
|
||||||
import org.apache.activemq.broker.BrokerService;
|
import org.apache.activemq.broker.BrokerService;
|
||||||
import org.apache.activemq.command.Command;
|
import org.apache.activemq.command.Command;
|
||||||
|
|
|
@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import javax.jms.InvalidClientIDException;
|
import jakarta.jms.InvalidClientIDException;
|
||||||
import javax.security.auth.login.CredentialException;
|
import javax.security.auth.login.CredentialException;
|
||||||
|
|
||||||
import org.apache.activemq.broker.Broker;
|
import org.apache.activemq.broker.Broker;
|
||||||
|
|
|
@ -24,8 +24,8 @@ import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import javax.jms.MessageConsumer;
|
import jakarta.jms.MessageConsumer;
|
||||||
import javax.jms.Session;
|
import jakarta.jms.Session;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnection;
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
|
@ -97,8 +97,8 @@ public class MQTTCompositeQueueRetainedTest extends MQTTTestSupport {
|
||||||
activeMQConnection.start();
|
activeMQConnection.start();
|
||||||
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
|
|
||||||
javax.jms.Queue jmsQueue = s.createQueue(FORWARD_QUEUE);
|
jakarta.jms.Queue jmsQueue = s.createQueue(FORWARD_QUEUE);
|
||||||
javax.jms.Topic jmsTopic = s.createTopic(FORWARD_TOPIC);
|
jakarta.jms.Topic jmsTopic = s.createTopic(FORWARD_TOPIC);
|
||||||
|
|
||||||
MessageConsumer queueConsumer = s.createConsumer(jmsQueue);
|
MessageConsumer queueConsumer = s.createConsumer(jmsQueue);
|
||||||
MessageConsumer topicConsumer = s.createDurableSubscriber(jmsTopic, "jms-subscription");
|
MessageConsumer topicConsumer = s.createDurableSubscriber(jmsTopic, "jms-subscription");
|
||||||
|
|
|
@ -37,14 +37,14 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.jms.BytesMessage;
|
import jakarta.jms.BytesMessage;
|
||||||
import javax.jms.Connection;
|
import jakarta.jms.Connection;
|
||||||
import javax.jms.Destination;
|
import jakarta.jms.Destination;
|
||||||
import javax.jms.MessageConsumer;
|
import jakarta.jms.MessageConsumer;
|
||||||
import javax.jms.MessageProducer;
|
import jakarta.jms.MessageProducer;
|
||||||
import javax.jms.Queue;
|
import jakarta.jms.Queue;
|
||||||
import javax.jms.Session;
|
import jakarta.jms.Session;
|
||||||
import javax.jms.TextMessage;
|
import jakarta.jms.TextMessage;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnection;
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||||
|
@ -1045,7 +1045,7 @@ public class MQTTTest extends MQTTTestSupport {
|
||||||
activeMQConnection.setUseRetroactiveConsumer(true);
|
activeMQConnection.setUseRetroactiveConsumer(true);
|
||||||
activeMQConnection.start();
|
activeMQConnection.start();
|
||||||
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
javax.jms.Topic jmsTopic = s.createTopic(destinationName);
|
jakarta.jms.Topic jmsTopic = s.createTopic(destinationName);
|
||||||
MessageConsumer consumer = s.createConsumer(jmsTopic);
|
MessageConsumer consumer = s.createConsumer(jmsTopic);
|
||||||
|
|
||||||
// check whether we received retained message on JMS subscribe
|
// check whether we received retained message on JMS subscribe
|
||||||
|
@ -1081,7 +1081,7 @@ public class MQTTTest extends MQTTTestSupport {
|
||||||
activeMQConnection.setUseRetroactiveConsumer(true);
|
activeMQConnection.setUseRetroactiveConsumer(true);
|
||||||
activeMQConnection.start();
|
activeMQConnection.start();
|
||||||
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
javax.jms.Topic jmsTopic = s.createTopic(destinationName);
|
jakarta.jms.Topic jmsTopic = s.createTopic(destinationName);
|
||||||
MessageProducer producer = s.createProducer(jmsTopic);
|
MessageProducer producer = s.createProducer(jmsTopic);
|
||||||
|
|
||||||
// send retained message from JMS
|
// send retained message from JMS
|
||||||
|
@ -1352,7 +1352,7 @@ public class MQTTTest extends MQTTTestSupport {
|
||||||
|
|
||||||
for (int i = 0; i < messagesToSend; i++) {
|
for (int i = 0; i < messagesToSend; i++) {
|
||||||
|
|
||||||
javax.jms.Message message = consumer.receive(2 * 1000);
|
jakarta.jms.Message message = consumer.receive(2 * 1000);
|
||||||
assertNotNull(message);
|
assertNotNull(message);
|
||||||
assertTrue(message instanceof BytesMessage);
|
assertTrue(message instanceof BytesMessage);
|
||||||
BytesMessage bytesMessage = (BytesMessage) message;
|
BytesMessage bytesMessage = (BytesMessage) message;
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.jms.JMSException;
|
import jakarta.jms.JMSException;
|
||||||
import javax.management.MalformedObjectNameException;
|
import javax.management.MalformedObjectNameException;
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,9 @@ import org.junit.Test;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import javax.jms.DeliveryMode;
|
import jakarta.jms.DeliveryMode;
|
||||||
import javax.jms.MessageConsumer;
|
import jakarta.jms.MessageConsumer;
|
||||||
import javax.jms.Session;
|
import jakarta.jms.Session;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
@ -197,7 +197,7 @@ public class MQTTVirtualTopicSubscriptionsTest extends MQTTTest {
|
||||||
activeMQConnection.setUseRetroactiveConsumer(true);
|
activeMQConnection.setUseRetroactiveConsumer(true);
|
||||||
activeMQConnection.start();
|
activeMQConnection.start();
|
||||||
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
Session s = activeMQConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||||
javax.jms.Queue consumerQ = s.createQueue("Consumer.RegularSub.VirtualTopic.foo.bah");
|
jakarta.jms.Queue consumerQ = s.createQueue("Consumer.RegularSub.VirtualTopic.foo.bah");
|
||||||
MessageConsumer consumer = s.createConsumer(consumerQ);
|
MessageConsumer consumer = s.createConsumer(consumerQ);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,10 @@ import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
import javax.jms.Message;
|
import jakarta.jms.Message;
|
||||||
import javax.jms.MessageConsumer;
|
import jakarta.jms.MessageConsumer;
|
||||||
import javax.jms.MessageListener;
|
import jakarta.jms.MessageListener;
|
||||||
import javax.jms.Session;
|
import jakarta.jms.Session;
|
||||||
|
|
||||||
import org.apache.activemq.ActiveMQConnection;
|
import org.apache.activemq.ActiveMQConnection;
|
||||||
import org.apache.activemq.util.Wait;
|
import org.apache.activemq.util.Wait;
|
||||||
|
|
|
@ -23,8 +23,8 @@ import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import javax.jms.MessageConsumer;
|
import jakarta.jms.MessageConsumer;
|
||||||
import javax.jms.Session;
|
import jakarta.jms.Session;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import jakarta.annotation.PostConstruct;
|
||||||
import javax.net.ssl.KeyManager;
|
import javax.net.ssl.KeyManager;
|
||||||
import javax.net.ssl.KeyManagerFactory;
|
import javax.net.ssl.KeyManagerFactory;
|
||||||
import javax.net.ssl.TrustManager;
|
import javax.net.ssl.TrustManager;
|
||||||
|
|
Loading…
Reference in New Issue