Merge pull request #996 from mattrpav/AMQ-9239

[AMQ-9239] Jakarta JMS broker
This commit is contained in:
Matt Pavlovich 2023-08-30 09:29:30 -05:00 committed by GitHub
commit fc13d61714
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1425 changed files with 9515 additions and 8092 deletions

14
Jenkinsfile vendored
View File

@ -30,7 +30,7 @@ pipeline {
tools {
// ... tell Jenkins what java version, maven version or other tools are required ...
maven 'maven_3_latest'
jdk 'jdk_11_latest'
jdk 'jdk_17_latest'
}
options {
@ -92,18 +92,6 @@ pipeline {
}
}
stage('Build JDK 11') {
tools {
jdk "jdk_11_latest"
}
steps {
echo 'Building JDK 11'
sh 'java -version'
sh 'mvn -version'
sh 'mvn -U -B -e clean install -DskipTests'
}
}
stage('Verify') {
steps {
echo 'Running apache-rat:check'

View File

@ -56,8 +56,8 @@
<artifactId>activemq-jdbc-store</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-annotation_1.3_spec</artifactId>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>

View File

@ -97,6 +97,11 @@
<artifactId>activemq-spring</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-stomp</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-http</artifactId>
@ -109,7 +114,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-server</artifactId>
<artifactId>websocket-jetty-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -19,8 +19,8 @@ package org.apache.activemq.transport.amqp.message;
import static org.apache.activemq.transport.amqp.message.AmqpMessageSupport.JMS_AMQP_MESSAGE_FORMAT;
import static org.apache.activemq.transport.amqp.message.AmqpMessageSupport.getBinaryFromMessageBody;
import javax.jms.JMSException;
import javax.jms.MessageFormatException;
import jakarta.jms.JMSException;
import jakarta.jms.MessageFormatException;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQMessage;

View File

@ -19,7 +19,7 @@ package org.apache.activemq.transport.amqp.message;
import static org.apache.activemq.transport.amqp.message.AmqpMessageSupport.JMS_AMQP_MESSAGE_FORMAT;
import static org.apache.activemq.transport.amqp.message.AmqpMessageSupport.JMS_AMQP_NATIVE;
import javax.jms.Message;
import jakarta.jms.Message;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQMessage;

View File

@ -28,7 +28,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.zip.InflaterInputStream;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQMapMessage;

View File

@ -18,7 +18,7 @@ package org.apache.activemq.transport.amqp.message;
import static org.apache.activemq.transport.amqp.message.AmqpMessageSupport.JMS_AMQP_NATIVE;
import javax.jms.BytesMessage;
import jakarta.jms.BytesMessage;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQMessage;

View File

@ -29,8 +29,8 @@ import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.Set;
import javax.jms.JMSException;
import javax.jms.Message;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import org.apache.activemq.ScheduledMessage;
import org.apache.activemq.command.ActiveMQDestination;
@ -209,7 +209,7 @@ public abstract class InboundTransformer {
ttl = header.getTtl().longValue();
}
if (ttl != javax.jms.Message.DEFAULT_TIME_TO_LIVE) {
if (ttl != jakarta.jms.Message.DEFAULT_TIME_TO_LIVE) {
jms.setExpiration(System.currentTimeMillis() + ttl);
}
}

View File

@ -41,8 +41,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.jms.JMSException;
import javax.jms.MessageNotWriteableException;
import jakarta.jms.JMSException;
import jakarta.jms.MessageNotWriteableException;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQMapMessage;

View File

@ -55,10 +55,10 @@ import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageEOFException;
import javax.jms.TextMessage;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageEOFException;
import jakarta.jms.TextMessage;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQDestination;

View File

@ -42,7 +42,7 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.InvalidClientIDException;
import jakarta.jms.InvalidClientIDException;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.AbstractRegion;

View File

@ -20,8 +20,8 @@ import static org.apache.activemq.transport.amqp.AmqpSupport.toLong;
import java.io.IOException;
import javax.jms.Destination;
import javax.jms.ResourceAllocationException;
import jakarta.jms.Destination;
import jakarta.jms.ResourceAllocationException;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQMessage;

View File

@ -31,7 +31,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.jms.InvalidSelectorException;
import jakarta.jms.InvalidSelectorException;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ActiveMQTempDestination;

View File

@ -20,17 +20,17 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.Destination;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.jmx.QueueViewMBean;

View File

@ -20,13 +20,13 @@ package org.apache.activemq.transport.amqp;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.junit.Test;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Queue;
import javax.jms.Session;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

View File

@ -22,13 +22,13 @@ import static org.junit.Assert.assertTrue;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Session;
import jakarta.jms.BytesMessage;
import jakarta.jms.Connection;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.Session;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;

View File

@ -19,20 +19,22 @@ package org.apache.activemq.transport.amqp;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import javax.jms.Connection;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.fusesource.stomp.jms.StompJmsConnectionFactory;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
@ -42,7 +44,6 @@ import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Ignore
public class AmqpAndStompInteropTest {
private static final Logger LOG = LoggerFactory.getLogger(AmqpAndStompInteropTest.class);
@ -73,7 +74,7 @@ public class AmqpAndStompInteropTest {
protected BrokerService createBroker() throws Exception {
BrokerService broker = new BrokerService();
broker.setPersistent(false);
broker.setUseJmx(false);
broker.setUseJmx(true);
broker.setAdvisorySupport(false);
broker.setSchedulerSupport(false);
@ -83,12 +84,14 @@ public class AmqpAndStompInteropTest {
return broker;
}
@Ignore
@Test(timeout = 30000)
public void testSendFromAMQPToSTOMP() throws Exception {
sendMessageToQueueUsingAmqp();
readMessageFromQueueUsingStomp();
}
@Ignore
@Test(timeout = 30000)
public void testSendFromSTOMPToAMQP() throws Exception {
sendMessageToQueueUsingStomp();
@ -135,6 +138,7 @@ public class AmqpAndStompInteropTest {
try {
TextMessage message = session.createTextMessage("test-message-stomp-source");
message.setIntProperty("content-length", message.getText().length());
producer.send(message);
LOG.info("Send STOMP message with Message ID -> {}", message.getJMSMessageID());
@ -223,4 +227,5 @@ public class AmqpAndStompInteropTest {
connection.start();
return connection;
}
}

View File

@ -26,12 +26,12 @@ import java.util.List;
import java.util.Set;
import java.util.Vector;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.net.ServerSocketFactory;
@ -98,6 +98,11 @@ public class AmqpTestSupport {
protected URI openwireURI;
protected int openwirePort;
static {
System.setProperty("jetty.ssl.sniRequired", "false");
System.setProperty("jetty.ssl.sniHostCheck", "false");
}
@Before
public void setUp() throws Exception {
LOG.info("========== start " + getTestName() + " ==========");
@ -352,7 +357,7 @@ public class AmqpTestSupport {
public Connection createJMSConnection() throws JMSException {
if (!isUseOpenWireConnector()) {
throw new javax.jms.IllegalStateException("OpenWire TransportConnector was not configured.");
throw new jakarta.jms.IllegalStateException("OpenWire TransportConnector was not configured.");
}
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(openwireURI);

View File

@ -25,15 +25,15 @@ import java.net.URI;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.BytesMessage;
import jakarta.jms.Connection;
import jakarta.jms.DeliveryMode;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;

View File

@ -18,7 +18,7 @@ package org.apache.activemq.transport.amqp;
import java.io.File;
import javax.jms.Connection;
import jakarta.jms.Connection;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;

View File

@ -18,14 +18,14 @@ package org.apache.activemq.transport.amqp;
import java.net.URI;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
import jakarta.jms.Connection;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.QueueConnection;
import jakarta.jms.QueueConnectionFactory;
import jakarta.jms.TopicConnection;
import jakarta.jms.TopicConnectionFactory;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.slf4j.Logger;

View File

@ -21,14 +21,14 @@ import static org.junit.Assert.assertTrue;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.Connection;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.PolicyEntry;

View File

@ -23,17 +23,17 @@ import static org.junit.Assert.fail;
import java.util.List;
import java.util.Vector;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.Topic;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageListener;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import jakarta.jms.Topic;
import org.junit.After;
import org.junit.Test;

View File

@ -23,15 +23,15 @@ import static org.junit.Assert.fail;
import java.net.URI;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.JMSSecurityException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.JMSSecurityException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.broker.BrokerFactory;
import org.apache.activemq.broker.BrokerService;

View File

@ -31,26 +31,26 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.TemporaryQueue;
import javax.jms.TemporaryTopic;
import javax.jms.TextMessage;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
import jakarta.jms.Connection;
import jakarta.jms.DeliveryMode;
import jakarta.jms.Destination;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.MapMessage;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageListener;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.QueueBrowser;
import jakarta.jms.Session;
import jakarta.jms.TemporaryQueue;
import jakarta.jms.TemporaryTopic;
import jakarta.jms.TextMessage;
import jakarta.jms.Topic;
import jakarta.jms.TopicConnection;
import jakarta.jms.TopicSession;
import jakarta.jms.TopicSubscriber;
import org.apache.activemq.broker.jmx.BrokerView;
import org.apache.activemq.broker.jmx.BrokerViewMBean;

View File

@ -19,8 +19,8 @@ package org.apache.activemq.transport.amqp;
import java.net.URI;
import java.net.URISyntaxException;
import javax.jms.Connection;
import javax.jms.JMSException;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import org.junit.After;

View File

@ -22,17 +22,17 @@ import static org.junit.Assert.assertTrue;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.DeliveryMode;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageListener;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.broker.jmx.QueueViewMBean;
import org.apache.activemq.broker.jmx.SubscriptionViewMBean;
@ -93,7 +93,7 @@ public class JMSClientTransactionTest extends JMSClientTestSupport {
for (int i = 0; i < MSG_COUNT; i++) {
TextMessage message = session.createTextMessage();
message.setText("test" + i);
messageProducer.send(message, DeliveryMode.PERSISTENT, javax.jms.Message.DEFAULT_PRIORITY, javax.jms.Message.DEFAULT_TIME_TO_LIVE);
messageProducer.send(message, DeliveryMode.PERSISTENT, jakarta.jms.Message.DEFAULT_PRIORITY, jakarta.jms.Message.DEFAULT_TIME_TO_LIVE);
}
session.close();
@ -130,7 +130,7 @@ public class JMSClientTransactionTest extends JMSClientTestSupport {
for (int i = 0; i < MSG_COUNT; i++) {
TextMessage message = session.createTextMessage();
message.setText("test" + i);
messageProducer.send(message, DeliveryMode.PERSISTENT, javax.jms.Message.DEFAULT_PRIORITY, javax.jms.Message.DEFAULT_TIME_TO_LIVE);
messageProducer.send(message, DeliveryMode.PERSISTENT, jakarta.jms.Message.DEFAULT_PRIORITY, jakarta.jms.Message.DEFAULT_TIME_TO_LIVE);
}
session.close();

View File

@ -25,14 +25,14 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.junit.Before;
import org.junit.Test;

View File

@ -23,14 +23,14 @@ import static org.junit.Assert.assertTrue;
import java.net.URI;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
import javax.jms.TopicSubscriber;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.Session;
import jakarta.jms.Topic;
import jakarta.jms.TopicConnection;
import jakarta.jms.TopicPublisher;
import jakarta.jms.TopicSession;
import jakarta.jms.TopicSubscriber;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.util.Wait;

View File

@ -31,16 +31,16 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.BytesMessage;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.MapMessage;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.ObjectMessage;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.ActiveMQConnection;
import org.apache.qpid.proton.amqp.Binary;

View File

@ -24,15 +24,15 @@ import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.Collection;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.BytesMessage;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.transport.amqp.client.AmqpClientTestSupport;
import org.junit.Rule;

View File

@ -24,7 +24,7 @@ import java.net.URI;
import java.util.Arrays;
import java.util.Collection;
import javax.jms.Connection;
import jakarta.jms.Connection;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.junit.Test;

View File

@ -20,13 +20,13 @@ import static org.junit.Assert.assertNotNull;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.BytesMessage;
import javax.jms.DeliveryMode;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import jakarta.jms.BytesMessage;
import jakarta.jms.DeliveryMode;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import org.junit.Test;
import org.slf4j.Logger;

View File

@ -22,8 +22,8 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.JMSException;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import org.junit.Test;

View File

@ -24,13 +24,13 @@ import static org.junit.Assert.assertTrue;
import java.util.Enumeration;
import java.util.concurrent.TimeUnit;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.QueueBrowser;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.broker.jmx.QueueViewMBean;
import org.apache.activemq.junit.ActiveMQTestRunner;

View File

@ -25,14 +25,14 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import jakarta.jms.TextMessage;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.PolicyEntry;

View File

@ -30,7 +30,7 @@ import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.InvalidDestinationException;
import jakarta.jms.InvalidDestinationException;
import org.apache.activemq.transport.amqp.client.util.AsyncResult;
import org.apache.activemq.transport.amqp.client.util.ClientFuture;

View File

@ -26,7 +26,7 @@ import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.InvalidDestinationException;
import jakarta.jms.InvalidDestinationException;
import org.apache.activemq.transport.amqp.client.util.AsyncResult;
import org.apache.activemq.transport.amqp.client.util.ClientFuture;

View File

@ -618,7 +618,7 @@ public class AmqpSession extends AmqpAbstractResource<Session> {
*/
public void begin() throws Exception {
if (txContext.isInTransaction()) {
throw new javax.jms.IllegalStateException("Session already has an active transaction");
throw new jakarta.jms.IllegalStateException("Session already has an active transaction");
}
txContext.begin();
@ -631,7 +631,7 @@ public class AmqpSession extends AmqpAbstractResource<Session> {
*/
public void commit() throws Exception {
if (!txContext.isInTransaction()) {
throw new javax.jms.IllegalStateException(
throw new jakarta.jms.IllegalStateException(
"Commit called on Session that does not have an active transaction");
}
@ -645,7 +645,7 @@ public class AmqpSession extends AmqpAbstractResource<Session> {
*/
public void rollback() throws Exception {
if (!txContext.isInTransaction()) {
throw new javax.jms.IllegalStateException(
throw new jakarta.jms.IllegalStateException(
"Rollback called on Session that does not have an active transaction");
}

View File

@ -19,12 +19,12 @@ package org.apache.activemq.transport.amqp.client;
import java.io.IOException;
import java.util.Map;
import javax.jms.InvalidClientIDException;
import javax.jms.InvalidDestinationException;
import javax.jms.JMSException;
import javax.jms.JMSSecurityException;
import javax.jms.ResourceAllocationException;
import javax.jms.TransactionRolledBackException;
import jakarta.jms.InvalidClientIDException;
import jakarta.jms.InvalidDestinationException;
import jakarta.jms.JMSException;
import jakarta.jms.JMSSecurityException;
import jakarta.jms.ResourceAllocationException;
import jakarta.jms.TransactionRolledBackException;
import org.apache.qpid.proton.amqp.Symbol;
import org.apache.qpid.proton.amqp.messaging.Modified;

View File

@ -24,9 +24,9 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.jms.IllegalStateException;
import javax.jms.JMSException;
import javax.jms.TransactionRolledBackException;
import jakarta.jms.IllegalStateException;
import jakarta.jms.JMSException;
import jakarta.jms.TransactionRolledBackException;
import org.apache.activemq.transport.amqp.client.util.AsyncResult;
import org.apache.activemq.transport.amqp.client.util.IOExceptionSupport;

View File

@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.jms.JMSSecurityException;
import jakarta.jms.JMSSecurityException;
import javax.security.sasl.SaslException;
import org.apache.qpid.proton.engine.Sasl;

View File

@ -24,13 +24,13 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import jakarta.jms.BytesMessage;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.jmx.QueueViewMBean;

View File

@ -25,11 +25,11 @@ import static org.junit.Assert.fail;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Session;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.Session;
import javax.management.ObjectName;
import org.apache.activemq.broker.jmx.JobSchedulerViewMBean;

View File

@ -33,9 +33,9 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.DeliveryMode;
import javax.jms.Queue;
import javax.jms.Topic;
import jakarta.jms.DeliveryMode;
import jakarta.jms.Queue;
import jakarta.jms.Topic;
import org.apache.activemq.broker.jmx.DestinationViewMBean;
import org.apache.activemq.broker.jmx.QueueViewMBean;
@ -553,9 +553,9 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
assertEquals(1, queueView.getQueueSize());
List<javax.jms.Message> messages = (List<javax.jms.Message>) queueView.browseMessages();
List<jakarta.jms.Message> messages = (List<jakarta.jms.Message>) queueView.browseMessages();
assertEquals(1, messages.size());
javax.jms.Message queueMessage = messages.get(0);
jakarta.jms.Message queueMessage = messages.get(0);
assertEquals("Queued message should not be persistent", DeliveryMode.NON_PERSISTENT, queueMessage.getJMSDeliveryMode());
receiver1.flow(1);

View File

@ -32,11 +32,11 @@ import org.junit.runners.Parameterized.Parameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import jakarta.jms.BytesMessage;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import java.util.Arrays;
import java.util.Collection;
import java.util.Random;

View File

@ -30,13 +30,13 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.jms.Destination;
import javax.jms.MapMessage;
import javax.jms.Queue;
import javax.jms.TemporaryQueue;
import javax.jms.TemporaryTopic;
import javax.jms.TextMessage;
import javax.jms.Topic;
import jakarta.jms.Destination;
import jakarta.jms.MapMessage;
import jakarta.jms.Queue;
import jakarta.jms.TemporaryQueue;
import jakarta.jms.TemporaryTopic;
import jakarta.jms.TextMessage;
import jakarta.jms.Topic;
import org.apache.activemq.command.ActiveMQBytesMessage;
import org.apache.activemq.command.ActiveMQMapMessage;
@ -72,7 +72,7 @@ public class JMSMappingInboundTransformerTest {
message.setContentType(AmqpMessageSupport.OCTET_STREAM_CONTENT_TYPE);
EncodedMessage em = encodeMessage(message);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -91,7 +91,7 @@ public class JMSMappingInboundTransformerTest {
Message message = Message.Factory.create();
EncodedMessage em = encodeMessage(message);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -112,7 +112,7 @@ public class JMSMappingInboundTransformerTest {
message.setContentType(AmqpMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
EncodedMessage em = encodeMessage(message);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQObjectMessage.class, jmsMessage.getClass());
@ -126,7 +126,7 @@ public class JMSMappingInboundTransformerTest {
message.setContentType("text/plain");
EncodedMessage em = encodeMessage(message);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQTextMessage.class, jmsMessage.getClass());
@ -146,7 +146,7 @@ public class JMSMappingInboundTransformerTest {
message.setContentType("unknown-content-type");
EncodedMessage em = encodeMessage(message);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQMessage.class, jmsMessage.getClass());
@ -171,7 +171,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -193,7 +193,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -217,7 +217,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -240,7 +240,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQObjectMessage.class, jmsMessage.getClass());
@ -343,7 +343,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
if (StandardCharsets.UTF_8.equals(expectedCharset)) {
@ -369,7 +369,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQTextMessage.class, jmsMessage.getClass());
@ -389,7 +389,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQTextMessage.class, jmsMessage.getClass());
@ -411,7 +411,7 @@ public class JMSMappingInboundTransformerTest {
message.setContentType(AmqpMessageSupport.SERIALIZED_JAVA_OBJECT_CONTENT_TYPE);
EncodedMessage em = encodeMessage(message);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQObjectMessage.class, jmsMessage.getClass());
@ -432,7 +432,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQMapMessage.class, jmsMessage.getClass());
@ -460,7 +460,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQMapMessage.class, jmsMessage.getClass());
@ -486,7 +486,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQStreamMessage.class, jmsMessage.getClass());
@ -507,7 +507,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQStreamMessage.class, jmsMessage.getClass());
@ -528,7 +528,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -550,7 +550,7 @@ public class JMSMappingInboundTransformerTest {
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertNotNull("Message should not be null", jmsMessage);
assertEquals("Unexpected message class type", ActiveMQBytesMessage.class, jmsMessage.getClass());
@ -565,7 +565,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(message);
JMSMappingInboundTransformer transformer = new JMSMappingInboundTransformer();
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertTrue("Expected TextMessage", jmsMessage instanceof TextMessage);
assertEquals("Unexpected message class type", ActiveMQTextMessage.class, jmsMessage.getClass());
@ -619,7 +619,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(amqp);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertTrue("Expected TextMessage", jmsMessage instanceof TextMessage);
}
@ -666,7 +666,7 @@ public class JMSMappingInboundTransformerTest {
EncodedMessage em = encodeMessage(amqp);
javax.jms.Message jmsMessage = transformer.transform(em);
jakarta.jms.Message jmsMessage = transformer.transform(em);
assertTrue("Expected TextMessage", jmsMessage instanceof TextMessage);
}

View File

@ -44,7 +44,7 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.command.ActiveMQBytesMessage;

View File

@ -25,12 +25,12 @@ import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import javax.jms.BytesMessage;
import javax.jms.DeliveryMode;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import jakarta.jms.BytesMessage;
import jakarta.jms.DeliveryMode;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.Session;
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.broker.BrokerService;

View File

@ -19,11 +19,11 @@ package org.apache.activemq.transport.amqp.profile;
import java.util.Enumeration;
import java.util.concurrent.TimeUnit;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.Queue;
import jakarta.jms.QueueBrowser;
import jakarta.jms.Session;
import org.apache.activemq.transport.amqp.JMSClientTestSupport;
import org.junit.Ignore;

View File

@ -47,8 +47,8 @@
<artifactId>activemq-openwire-legacy</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<!-- =============================== -->

View File

@ -40,8 +40,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import javax.management.InstanceNotFoundException;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;

View File

@ -24,7 +24,7 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import javax.transaction.xa.XAException;
import org.apache.activemq.broker.jmx.ManagedRegionBroker;

View File

@ -26,10 +26,10 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.jms.Connection;
import javax.jms.InvalidSelectorException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import jakarta.jms.Connection;
import jakarta.jms.InvalidSelectorException;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;

View File

@ -20,7 +20,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.jms.InvalidSelectorException;
import jakarta.jms.InvalidSelectorException;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.jmx;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import javax.management.ObjectName;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -24,8 +24,8 @@ import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import javax.jms.IllegalStateException;
import javax.jms.JMSException;
import jakarta.jms.IllegalStateException;
import jakarta.jms.JMSException;
import javax.management.InstanceNotFoundException;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.jmx;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import javax.management.ObjectName;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.jmx;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import javax.management.ObjectName;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.jmx;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import javax.management.ObjectName;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -27,8 +27,8 @@ import org.apache.activemq.command.ActiveMQStreamMessage;
import org.apache.activemq.command.ActiveMQTextMessage;
import org.fusesource.hawtbuf.UTF8Buffer;
import javax.jms.DeliveryMode;
import javax.jms.JMSException;
import jakarta.jms.DeliveryMode;
import jakarta.jms.JMSException;
import javax.management.openmbean.ArrayType;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.CompositeDataSupport;

View File

@ -20,7 +20,7 @@ import java.util.Map;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.OpenDataException;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.broker.region.Queue;

View File

@ -19,7 +19,7 @@ package org.apache.activemq.broker.jmx;
import java.io.IOException;
import java.util.Set;
import javax.jms.InvalidSelectorException;
import jakarta.jms.InvalidSelectorException;
import javax.management.ObjectName;
import org.apache.activemq.broker.BrokerService;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.jmx;
import javax.jms.InvalidSelectorException;
import jakarta.jms.InvalidSelectorException;
import javax.management.ObjectName;
/**

View File

@ -25,8 +25,8 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.jms.IllegalStateException;
import javax.jms.JMSException;
import jakarta.jms.IllegalStateException;
import jakarta.jms.JMSException;
import org.apache.activemq.DestinationDoesNotExistException;
import org.apache.activemq.advisory.AdvisorySupport;

View File

@ -22,8 +22,8 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.InvalidSelectorException;
import javax.jms.JMSException;
import jakarta.jms.InvalidSelectorException;
import jakarta.jms.JMSException;
import javax.management.ObjectName;
import org.apache.activemq.broker.Broker;

View File

@ -20,7 +20,7 @@ import java.io.IOException;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.ResourceAllocationException;
import jakarta.jms.ResourceAllocationException;
import org.apache.activemq.advisory.AdvisorySupport;
import org.apache.activemq.broker.Broker;

View File

@ -26,8 +26,8 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import javax.jms.InvalidSelectorException;
import javax.jms.JMSException;
import jakarta.jms.InvalidSelectorException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.region;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -24,7 +24,7 @@ import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -46,9 +46,9 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.jms.InvalidSelectorException;
import javax.jms.JMSException;
import javax.jms.ResourceAllocationException;
import jakarta.jms.InvalidSelectorException;
import jakarta.jms.JMSException;
import jakarta.jms.ResourceAllocationException;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.BrokerStoppedException;

View File

@ -22,7 +22,7 @@ import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -19,7 +19,7 @@ package org.apache.activemq.broker.region;
import java.util.Iterator;
import java.util.Set;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.broker.region.policy.PolicyEntry;

View File

@ -18,7 +18,7 @@ package org.apache.activemq.broker.region;
import java.io.IOException;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -31,8 +31,8 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.jms.InvalidClientIDException;
import javax.jms.JMSException;
import jakarta.jms.InvalidClientIDException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.BrokerService;

View File

@ -19,7 +19,7 @@ package org.apache.activemq.broker.region;
import java.io.IOException;
import java.util.List;
import javax.jms.InvalidSelectorException;
import jakarta.jms.InvalidSelectorException;
import javax.management.ObjectName;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.region;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.command.ActiveMQDestination;

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.region;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import org.apache.activemq.broker.ConnectionContext;
import org.apache.activemq.broker.region.policy.PolicyEntry;

View File

@ -63,7 +63,7 @@ import org.apache.activemq.util.SubscriptionKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import static org.apache.activemq.transaction.Transaction.IN_USE_STATE;
@ -398,7 +398,7 @@ public class Topic extends BaseDestination implements Task {
}
if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) {
throw new javax.jms.ResourceAllocationException("Usage Manager memory limit ("
throw new jakarta.jms.ResourceAllocationException("Usage Manager memory limit ("
+ memoryUsage.getLimit() + ") reached. Rejecting send for producer (" + message.getProducerId()
+ ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
+ " See http://activemq.apache.org/producer-flow-control.html for more info");
@ -528,7 +528,7 @@ public class Topic extends BaseDestination implements Task {
+ ") to prevent flooding " + getActiveMQDestination().getQualifiedName() + "."
+ " See http://activemq.apache.org/producer-flow-control.html for more info";
if (!context.isNetworkConnection() && systemUsage.isSendFailIfNoSpace()) {
throw new javax.jms.ResourceAllocationException(logMessage);
throw new jakarta.jms.ResourceAllocationException(logMessage);
}
waitForSpace(context,producerExchange, systemUsage.getStoreUsage(), getStoreUsageHighWaterMark(), logMessage);

View File

@ -28,8 +28,8 @@ import java.util.TimerTask;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.jms.InvalidDestinationException;
import javax.jms.JMSException;
import jakarta.jms.InvalidDestinationException;
import jakarta.jms.JMSException;
import org.apache.activemq.advisory.AdvisorySupport;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -32,7 +32,7 @@ import org.apache.activemq.usage.SystemUsage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;

View File

@ -109,7 +109,7 @@ public class PrioritizedPendingList implements PendingList {
}
protected int getPriority(MessageReference message) {
int priority = javax.jms.Message.DEFAULT_PRIORITY;
int priority = jakarta.jms.Message.DEFAULT_PRIORITY;
if (message.getMessageId() != null) {
priority = Math.max(message.getMessage().getPriority(), 0);
priority = Math.min(priority, 9);

View File

@ -16,7 +16,7 @@
*/
package org.apache.activemq.broker.region.policy;
import javax.jms.MessageListener;
import jakarta.jms.MessageListener;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.Message;

View File

@ -17,9 +17,9 @@
package org.apache.activemq.broker.region.policy;
import java.util.concurrent.atomic.AtomicLong;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageListener;
import org.apache.activemq.ActiveMQMessageTransformation;
import org.apache.activemq.broker.Broker;
import org.apache.activemq.broker.ConnectionContext;

View File

@ -16,8 +16,8 @@
*/
package org.apache.activemq.broker.region.virtual;
import javax.jms.InvalidSelectorException;
import javax.jms.JMSException;
import jakarta.jms.InvalidSelectorException;
import jakarta.jms.JMSException;
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.filter.BooleanExpression;

View File

@ -34,7 +34,7 @@ import org.apache.activemq.command.LocalTransactionId;
import org.apache.activemq.command.Message;
import org.apache.activemq.util.LRUCache;
import javax.jms.ResourceAllocationException;
import jakarta.jms.ResourceAllocationException;
/**
* A Destination which implements <a href="https://activemq.apache.org/virtual-destinations">Virtual Topic</a>

View File

@ -19,7 +19,7 @@ package org.apache.activemq.broker.scheduler;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.MessageFormatException;
import jakarta.jms.MessageFormatException;
import org.apache.activemq.ScheduledMessage;
import org.apache.activemq.advisory.AdvisorySupport;

View File

@ -31,7 +31,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import javax.jms.MessageFormatException;
import jakarta.jms.MessageFormatException;
import org.apache.activemq.broker.scheduler.CronParser;
import org.apache.activemq.broker.scheduler.Job;

View File

@ -18,7 +18,7 @@ package org.apache.activemq.broker.util;
import java.util.Set;
import javax.annotation.PostConstruct;
import jakarta.annotation.PostConstruct;
import org.apache.activemq.broker.BrokerPluginSupport;
import org.apache.activemq.broker.Connection;

View File

@ -21,9 +21,9 @@ import org.apache.activemq.util.ByteArrayInputStream;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
import javax.jms.BytesMessage;
import javax.jms.JMSException;
import javax.jms.TextMessage;
import jakarta.jms.BytesMessage;
import jakarta.jms.JMSException;
import jakarta.jms.TextMessage;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;

View File

@ -18,13 +18,13 @@ package org.apache.activemq.network.jms;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageListener;
import jakarta.jms.MessageProducer;
import org.apache.activemq.Service;
import org.slf4j.Logger;

View File

@ -29,8 +29,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import javax.jms.Connection;
import javax.jms.Destination;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.Service;

View File

@ -16,10 +16,10 @@
*/
package org.apache.activemq.network.jms;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
/**
* Converts Message from one JMS to another

View File

@ -16,16 +16,16 @@
*/
package org.apache.activemq.network.jms;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Queue;
import jakarta.jms.QueueConnection;
import jakarta.jms.QueueSender;
import jakarta.jms.QueueSession;
import jakarta.jms.Session;
/**
* A Destination bridge is used to bridge Queues between to different JMS systems

View File

@ -16,10 +16,10 @@
*/
package org.apache.activemq.network.jms;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
/**
* Converts Message from one JMS to another

View File

@ -16,15 +16,15 @@
*/
package org.apache.activemq.network.jms;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueSession;
import javax.jms.Session;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.Queue;
import jakarta.jms.QueueConnection;
import jakarta.jms.QueueConnectionFactory;
import jakarta.jms.QueueSession;
import jakarta.jms.Session;
import javax.naming.NamingException;
import org.slf4j.Logger;

View File

@ -16,15 +16,15 @@
*/
package org.apache.activemq.network.jms;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
import javax.jms.TopicSession;
import jakarta.jms.Connection;
import jakarta.jms.Destination;
import jakarta.jms.ExceptionListener;
import jakarta.jms.JMSException;
import jakarta.jms.Session;
import jakarta.jms.Topic;
import jakarta.jms.TopicConnection;
import jakarta.jms.TopicConnectionFactory;
import jakarta.jms.TopicSession;
import javax.naming.NamingException;
import org.slf4j.Logger;

View File

@ -16,16 +16,16 @@
*/
package org.apache.activemq.network.jms;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicPublisher;
import javax.jms.TopicSession;
import jakarta.jms.Connection;
import jakarta.jms.JMSException;
import jakarta.jms.Message;
import jakarta.jms.MessageConsumer;
import jakarta.jms.MessageProducer;
import jakarta.jms.Session;
import jakarta.jms.Topic;
import jakarta.jms.TopicConnection;
import jakarta.jms.TopicPublisher;
import jakarta.jms.TopicSession;
/**
* A Destination bridge is used to bridge between to different JMS systems

View File

@ -22,7 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import javax.jms.JMSException;
import jakarta.jms.JMSException;
import javax.management.ObjectName;
import org.apache.activemq.advisory.AdvisorySupport;
@ -285,7 +285,7 @@ public class StatisticsBroker extends BrokerFilter {
throws Exception {
msg.setPersistent(false);
msg.setTimestamp(System.currentTimeMillis());
msg.setPriority((byte) javax.jms.Message.DEFAULT_PRIORITY);
msg.setPriority((byte) jakarta.jms.Message.DEFAULT_PRIORITY);
msg.setType(AdvisorySupport.ADIVSORY_MESSAGE_TYPE);
msg.setMessageId(new MessageId(this.advisoryProducerId, this.messageIdGenerator.getNextSequenceId()));
msg.setDestination(replyTo);

View File

@ -249,10 +249,10 @@ public class AuthorizationBroker extends BrokerFilter implements SecurityAdminMB
removeDestinationRole(new ActiveMQTopic(topic), operation, role);
}
public void addDestinationRole(javax.jms.Destination destination, String operation, String role) {
public void addDestinationRole(jakarta.jms.Destination destination, String operation, String role) {
}
public void removeDestinationRole(javax.jms.Destination destination, String operation, String role) {
public void removeDestinationRole(jakarta.jms.Destination destination, String operation, String role) {
}
@Override

Some files were not shown because too many files have changed in this diff Show More