mirror of https://github.com/apache/activemq.git
[AMQ-9239] jakarta.jms - activemq-broker changes
This commit is contained in:
parent
e2121de655
commit
fa7d1347e9
|
@ -47,10 +47,10 @@
|
|||
<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>
|
||||
|
||||
|
||||
<!-- =============================== -->
|
||||
<!-- Optional Dependencies -->
|
||||
<!-- =============================== -->
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.apache.activemq.broker.jmx;
|
||||
|
||||
import javax.jms.InvalidSelectorException;
|
||||
import jakarta.jms.InvalidSelectorException;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.apache.activemq.broker.region;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.activemq.store;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
import org.apache.activemq.command.MessageAck;
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.activemq.store;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
import org.apache.activemq.command.MessageId;
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Iterator;
|
|||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.FutureTask;
|
||||
import javax.jms.TransactionRolledBackException;
|
||||
import jakarta.jms.TransactionRolledBackException;
|
||||
import javax.transaction.xa.XAException;
|
||||
|
||||
import org.apache.activemq.TransactionContext;
|
||||
|
|
|
@ -19,14 +19,14 @@ package org.apache.activemq;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import javax.jms.Destination;
|
||||
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.Destination;
|
||||
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.test.JmsResourceProvider;
|
||||
import org.slf4j.Logger;
|
||||
|
|
|
@ -21,17 +21,17 @@ import java.net.URISyntaxException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
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.ObjectMessage;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
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.ObjectMessage;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.broker.BrokerFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.activemq.broker;
|
|||
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.InvalidClientIDException;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.InvalidClientIDException;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.command.ConnectionInfo;
|
||||
|
|
|
@ -21,7 +21,7 @@ import org.junit.After;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import jakarta.jms.Connection;
|
||||
import java.net.URI;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ package org.apache.activemq.broker.interceptor;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageListener;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.Topic;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageListener;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.Topic;
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerRegistry;
|
||||
|
@ -88,13 +88,13 @@ public class MessageInterceptorTest extends TestCase {
|
|||
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < messageCount; i++){
|
||||
javax.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
jakarta.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
|
@ -122,13 +122,13 @@ public class MessageInterceptorTest extends TestCase {
|
|||
final CountDownLatch latch = new CountDownLatch(messageCount);
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < messageCount; i++){
|
||||
javax.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
jakarta.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
|
@ -149,13 +149,13 @@ public class MessageInterceptorTest extends TestCase {
|
|||
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < messageCount; i++){
|
||||
javax.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
jakarta.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
|
@ -184,13 +184,13 @@ public class MessageInterceptorTest extends TestCase {
|
|||
consumer = consumerSession.createConsumer(queue);
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < messageCount; i++){
|
||||
javax.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
jakarta.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
|
@ -219,13 +219,13 @@ public class MessageInterceptorTest extends TestCase {
|
|||
consumer = consumerSession.createConsumer(queue);
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < messageCount; i++){
|
||||
javax.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
jakarta.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ public class MessageInterceptorTest extends TestCase {
|
|||
|
||||
consumer.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
|
@ -266,13 +266,13 @@ public class MessageInterceptorTest extends TestCase {
|
|||
|
||||
consumer1.setMessageListener(new MessageListener() {
|
||||
@Override
|
||||
public void onMessage(javax.jms.Message message) {
|
||||
public void onMessage(jakarta.jms.Message message) {
|
||||
latch.countDown();
|
||||
|
||||
}
|
||||
});
|
||||
for (int i = 0; i < messageCount; i++){
|
||||
javax.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
jakarta.jms.Message message = producerSession.createTextMessage("test: " + i);
|
||||
producer.send(message);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ import static org.junit.Assert.assertNotNull;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.Session;
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
|
|
|
@ -19,11 +19,11 @@ package org.apache.activemq.bugs;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
import javax.management.ObjectName;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -16,17 +16,17 @@
|
|||
*/
|
||||
package org.apache.activemq.test;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionConsumer;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.DeliveryMode;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.ServerSessionPool;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.Topic;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionConsumer;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.DeliveryMode;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.ServerSessionPool;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.Topic;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class JmsResourceProvider {
|
|||
/**
|
||||
* Creates a connection.
|
||||
*
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createConnection(javax.jms.ConnectionFactory)
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createConnection(jakarta.jms.ConnectionFactory)
|
||||
*/
|
||||
public Connection createConnection(ConnectionFactory cf) throws JMSException {
|
||||
Connection connection = cf.createConnection();
|
||||
|
@ -66,15 +66,15 @@ public class JmsResourceProvider {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createSession(javax.jms.Connection)
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createSession(jakarta.jms.Connection)
|
||||
*/
|
||||
public Session createSession(Connection conn) throws JMSException {
|
||||
return conn.createSession(transacted, ackMode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createConsumer(javax.jms.Session,
|
||||
* javax.jms.Destination)
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createConsumer(jakarta.jms.Session,
|
||||
* jakarta.jms.Destination)
|
||||
*/
|
||||
public MessageConsumer createConsumer(Session session, Destination destination) throws JMSException {
|
||||
if (isDurableSubscriber()) {
|
||||
|
@ -96,8 +96,8 @@ public class JmsResourceProvider {
|
|||
/**
|
||||
* Creates a producer.
|
||||
*
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createProducer(javax.jms.Session,
|
||||
* javax.jms.Destination)
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createProducer(jakarta.jms.Session,
|
||||
* jakarta.jms.Destination)
|
||||
*/
|
||||
public MessageProducer createProducer(Session session, Destination destination) throws JMSException {
|
||||
MessageProducer producer = session.createProducer(destination);
|
||||
|
@ -108,7 +108,7 @@ public class JmsResourceProvider {
|
|||
/**
|
||||
* Creates a destination, which can either a topic or a queue.
|
||||
*
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createDestination(javax.jms.Session,
|
||||
* @see org.apache.activemq.test.JmsResourceProvider#createDestination(jakarta.jms.Session,
|
||||
* java.lang.String)
|
||||
*/
|
||||
public Destination createDestination(Session session, String name) throws JMSException {
|
||||
|
|
|
@ -19,12 +19,12 @@ package org.apache.activemq.test;
|
|||
import java.io.File;
|
||||
import java.lang.reflect.Array;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.TextMessage;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.TextMessage;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
|
|
Loading…
Reference in New Issue