[AMQ-9239] jakarta.jms - activemq-jms-pool, activemq-pool changes

This commit is contained in:
Matt Pavlovich 2023-03-30 11:31:20 -05:00
parent ef0b6dd0f2
commit 30114aa86d
44 changed files with 290 additions and 287 deletions

View File

@ -43,19 +43,20 @@
<groupId>jakarta.jms</groupId> <groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId> <artifactId>jakarta.jms-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<optional>true</optional>
</dependency>
<dependency> <dependency>
<groupId>org.apache.geronimo.components</groupId> <groupId>org.apache.geronimo.components</groupId>
<artifactId>geronimo-transaction</artifactId> <artifactId>geronimo-transaction</artifactId>
<classifier>jakarta</classifier>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.geronimo.specs</groupId> <groupId>jakarta.annotation</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId> <artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-annotation_1.3_spec</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>

View File

@ -21,13 +21,13 @@ import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ExceptionListener; import jakarta.jms.ExceptionListener;
import javax.jms.IllegalStateException; import jakarta.jms.IllegalStateException;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TemporaryQueue; import jakarta.jms.TemporaryQueue;
import javax.jms.TemporaryTopic; import jakarta.jms.TemporaryTopic;
import org.apache.commons.pool2.KeyedPooledObjectFactory; import org.apache.commons.pool2.KeyedPooledObjectFactory;
import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.PooledObject;

View File

@ -18,13 +18,13 @@ package org.apache.activemq.jms.pool;
import java.io.IOException; import java.io.IOException;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.XAConnection; import jakarta.jms.XAConnection;
import javax.jms.XAConnectionFactory; import jakarta.jms.XAConnectionFactory;
import javax.jms.XASession; import jakarta.jms.XASession;
import javax.transaction.SystemException; import jakarta.transaction.SystemException;
import javax.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
import org.apache.geronimo.transaction.manager.NamedXAResourceFactory; import org.apache.geronimo.transaction.manager.NamedXAResourceFactory;

View File

@ -15,10 +15,10 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.XASession; import jakarta.jms.XASession;
import javax.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
import org.apache.geronimo.transaction.manager.WrapperNamedXAResource; import org.apache.geronimo.transaction.manager.WrapperNamedXAResource;

View File

@ -15,7 +15,7 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.Connection; import jakarta.jms.Connection;
public class JcaPooledConnectionFactory extends XaPooledConnectionFactory { public class JcaPooledConnectionFactory extends XaPooledConnectionFactory {

View File

@ -19,23 +19,23 @@ package org.apache.activemq.jms.pool;
import java.util.List; import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionConsumer; import jakarta.jms.ConnectionConsumer;
import javax.jms.ConnectionMetaData; import jakarta.jms.ConnectionMetaData;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.ExceptionListener; import jakarta.jms.ExceptionListener;
import javax.jms.IllegalStateException; import jakarta.jms.IllegalStateException;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.QueueConnection; import jakarta.jms.QueueConnection;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.ServerSessionPool; import jakarta.jms.ServerSessionPool;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TemporaryQueue; import jakarta.jms.TemporaryQueue;
import javax.jms.TemporaryTopic; import jakarta.jms.TemporaryTopic;
import javax.jms.Topic; import jakarta.jms.Topic;
import javax.jms.TopicConnection; import jakarta.jms.TopicConnection;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -216,7 +216,7 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
/** /**
* *
* @see javax.jms.ConnectionConsumer * @see jakarta.jms.ConnectionConsumer
* @since 2.0 * @since 2.0
*/ */
@Override @Override
@ -227,7 +227,7 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
/** /**
* *
* @see javax.jms.ConnectionConsumer * @see jakarta.jms.ConnectionConsumer
* @since 2.0 * @since 2.0
*/ */
@Override @Override
@ -261,7 +261,7 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
return pool.getConnection(); return pool.getConnection();
} }
protected void assertNotClosed() throws javax.jms.IllegalStateException { protected void assertNotClosed() throws jakarta.jms.IllegalStateException {
if (stopped || pool == null) { if (stopped || pool == null) {
throw new IllegalStateException("Connection closed"); throw new IllegalStateException("Connection closed");
} }

View File

@ -21,14 +21,14 @@ import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.JMSContext; import jakarta.jms.JMSContext;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.QueueConnection; import jakarta.jms.QueueConnection;
import javax.jms.QueueConnectionFactory; import jakarta.jms.QueueConnectionFactory;
import javax.jms.TopicConnection; import jakarta.jms.TopicConnection;
import javax.jms.TopicConnectionFactory; import jakarta.jms.TopicConnectionFactory;
import org.apache.commons.pool2.KeyedPooledObjectFactory; import org.apache.commons.pool2.KeyedPooledObjectFactory;
import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.PooledObject;
@ -181,7 +181,7 @@ public class PooledConnectionFactory implements ConnectionFactory, QueueConnecti
if (toUse instanceof ConnectionFactory) { if (toUse instanceof ConnectionFactory) {
this.connectionFactory = toUse; this.connectionFactory = toUse;
} else { } else {
throw new IllegalArgumentException("connectionFactory should implement javax.jms.ConnectionFactory"); throw new IllegalArgumentException("connectionFactory should implement jakarta.jms.ConnectionFactory");
} }
} }
@ -323,7 +323,7 @@ public class PooledConnectionFactory implements ConnectionFactory, QueueConnecti
return ((ConnectionFactory) connectionFactory).createConnection(key.getUserName(), key.getPassword()); return ((ConnectionFactory) connectionFactory).createConnection(key.getUserName(), key.getPassword());
} }
} else { } else {
throw new IllegalStateException("connectionFactory should implement javax.jms.ConnectionFactory"); throw new IllegalStateException("connectionFactory should implement jakarta.jms.ConnectionFactory");
} }
} }

View File

@ -16,10 +16,10 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageListener; import jakarta.jms.MessageListener;
/** /**
* A {@link MessageConsumer} which was created by {@link PooledSession}. * A {@link MessageConsumer} which was created by {@link PooledSession}.

View File

@ -16,12 +16,12 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.CompletionListener; import jakarta.jms.CompletionListener;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.InvalidDestinationException; import jakarta.jms.InvalidDestinationException;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
/** /**
* A pooled {@link MessageProducer} * A pooled {@link MessageProducer}
@ -107,7 +107,7 @@ public class PooledProducer implements MessageProducer {
* specified. * specified.
* @throws InvalidDestinationException if a client uses this method with an * @throws InvalidDestinationException if a client uses this method with an
* invalid destination. * invalid destination.
* @see javax.jms.Session#createProducer * @see jakarta.jms.Session#createProducer
* @since 2.0 * @since 2.0
*/ */
@Override @Override
@ -151,7 +151,7 @@ public class PooledProducer implements MessageProducer {
* Gets the delivery delay value for this <CODE>MessageProducer</CODE>. * Gets the delivery delay value for this <CODE>MessageProducer</CODE>.
* *
* @return the delivery delay for this messageProducer * @return the delivery delay for this messageProducer
* @throws javax.jms.JMSException if the JMS provider fails to determine if deliver delay is * @throws jakarta.jms.JMSException if the JMS provider fails to determine if deliver delay is
* disabled due to some internal error. * disabled due to some internal error.
*/ */
@Override @Override

View File

@ -16,11 +16,11 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.QueueSender; import jakarta.jms.QueueSender;
/** /**
* {@link QueueSender} instance that is created and managed by the PooledConnection. * {@link QueueSender} instance that is created and managed by the PooledConnection.

View File

@ -21,30 +21,30 @@ import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.BytesMessage; import jakarta.jms.BytesMessage;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.MapMessage; import jakarta.jms.MapMessage;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageListener; import jakarta.jms.MessageListener;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.ObjectMessage; import jakarta.jms.ObjectMessage;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.QueueBrowser; import jakarta.jms.QueueBrowser;
import javax.jms.QueueReceiver; import jakarta.jms.QueueReceiver;
import javax.jms.QueueSender; import jakarta.jms.QueueSender;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.StreamMessage; import jakarta.jms.StreamMessage;
import javax.jms.TemporaryQueue; import jakarta.jms.TemporaryQueue;
import javax.jms.TemporaryTopic; import jakarta.jms.TemporaryTopic;
import javax.jms.TextMessage; import jakarta.jms.TextMessage;
import javax.jms.Topic; import jakarta.jms.Topic;
import javax.jms.TopicPublisher; import jakarta.jms.TopicPublisher;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import javax.jms.TopicSubscriber; import jakarta.jms.TopicSubscriber;
import javax.jms.XASession; import jakarta.jms.XASession;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
import org.apache.commons.pool2.KeyedObjectPool; import org.apache.commons.pool2.KeyedObjectPool;
@ -152,7 +152,7 @@ public class PooledSession implements Session, TopicSession, QueueSession, XASes
try { try {
sessionPool.returnObject(key, sessionHolder); sessionPool.returnObject(key, sessionHolder);
} catch (Exception e) { } catch (Exception e) {
javax.jms.IllegalStateException illegalStateException = new javax.jms.IllegalStateException(e.toString()); jakarta.jms.IllegalStateException illegalStateException = new jakarta.jms.IllegalStateException(e.toString());
illegalStateException.initCause(e); illegalStateException.initCause(e);
throw illegalStateException; throw illegalStateException;
} }

View File

@ -17,8 +17,8 @@
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.TemporaryQueue; import jakarta.jms.TemporaryQueue;
import javax.jms.TemporaryTopic; import jakarta.jms.TemporaryTopic;
interface PooledSessionEventListener { interface PooledSessionEventListener {

View File

@ -16,11 +16,11 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.Topic; import jakarta.jms.Topic;
import javax.jms.TopicPublisher; import jakarta.jms.TopicPublisher;
/** /**
* A {@link TopicPublisher} instance that is created and managed by a PooledConnection. * A {@link TopicPublisher} instance that is created and managed by a PooledConnection.

View File

@ -16,13 +16,13 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.QueueSender; import jakarta.jms.QueueSender;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TopicPublisher; import jakarta.jms.TopicPublisher;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
/** /**
* Used to store a pooled session instance and any resources that can * Used to store a pooled session instance and any resources that can

View File

@ -16,14 +16,14 @@
*/ */
package org.apache.activemq.jms.pool; package org.apache.activemq.jms.pool;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.XAConnection; import jakarta.jms.XAConnection;
import javax.transaction.RollbackException; import jakarta.transaction.RollbackException;
import javax.transaction.Status; import jakarta.transaction.Status;
import javax.transaction.SystemException; import jakarta.transaction.SystemException;
import javax.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
/** /**
@ -87,7 +87,7 @@ public class XaConnectionPool extends ConnectionPool {
return session.getXAResource(); return session.getXAResource();
} }
protected class Synchronization implements javax.transaction.Synchronization { protected class Synchronization implements jakarta.transaction.Synchronization {
private final PooledSession session; private final PooledSession session;
private Synchronization(PooledSession session) { private Synchronization(PooledSession session) {

View File

@ -19,16 +19,16 @@ package org.apache.activemq.jms.pool;
import java.io.Serializable; import java.io.Serializable;
import java.util.Hashtable; import java.util.Hashtable;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.XAConnectionFactory; import jakarta.jms.XAConnectionFactory;
import javax.naming.Binding; import javax.naming.Binding;
import javax.naming.Context; import javax.naming.Context;
import javax.naming.InitialContext; import javax.naming.InitialContext;
import javax.naming.Name; import javax.naming.Name;
import javax.naming.NamingEnumeration; import javax.naming.NamingEnumeration;
import javax.naming.spi.ObjectFactory; import javax.naming.spi.ObjectFactory;
import javax.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -81,7 +81,7 @@ public class XaPooledConnectionFactory extends PooledConnectionFactory implement
return ((XAConnectionFactory) connectionFactory).createXAConnection(key.getUserName(), key.getPassword()); return ((XAConnectionFactory) connectionFactory).createXAConnection(key.getUserName(), key.getPassword());
} }
} else { } else {
throw new IllegalStateException("connectionFactory should implement javax.jms.XAConnectionFactory"); throw new IllegalStateException("connectionFactory should implement jakarta.jms.XAConnectionFactory");
} }
} }

View File

@ -22,8 +22,8 @@ import static org.junit.Assert.assertTrue;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.Session; import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;
@ -116,7 +116,7 @@ public class ConnectionExpiryEvictsFromPoolTest extends JmsPoolTestSupport {
try { try {
// any operation on session first checks whether session is closed // any operation on session first checks whether session is closed
s.getTransacted(); s.getTransacted();
} catch (javax.jms.IllegalStateException e) { } catch (jakarta.jms.IllegalStateException e) {
assertTrue("Session should be fine, instead: " + e.getMessage(), false); assertTrue("Session should be fine, instead: " + e.getMessage(), false);
} }

View File

@ -18,8 +18,8 @@ package org.apache.activemq.jms.pool;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -18,7 +18,7 @@ package org.apache.activemq.jms.pool;
import java.util.Set; import java.util.Set;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.management.MalformedObjectNameException; import javax.management.MalformedObjectNameException;
import javax.management.ObjectName; import javax.management.ObjectName;

View File

@ -25,9 +25,9 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;

View File

@ -25,11 +25,11 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.QueueConnectionFactory; import jakarta.jms.QueueConnectionFactory;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TopicConnectionFactory; import jakarta.jms.TopicConnectionFactory;
import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;

View File

@ -18,11 +18,11 @@ package org.apache.activemq.jms.pool;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.Topic; import jakarta.jms.Topic;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -24,12 +24,12 @@ import static org.junit.Assert.fail;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ExceptionListener; import jakarta.jms.ExceptionListener;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.Session; import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -23,13 +23,13 @@ import static org.junit.Assert.fail;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ExceptionListener; import jakarta.jms.ExceptionListener;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.JMSSecurityException; import jakarta.jms.JMSSecurityException;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.Session; import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerPlugin; import org.apache.activemq.broker.BrokerPlugin;

View File

@ -23,11 +23,11 @@ import static org.junit.Assert.assertTrue;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Session; import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -21,11 +21,11 @@ import static org.junit.Assert.assertTrue;
import java.net.URI; import java.net.URI;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TemporaryQueue; import jakarta.jms.TemporaryQueue;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -18,15 +18,15 @@ package org.apache.activemq.jms.pool;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TemporaryQueue; import jakarta.jms.TemporaryQueue;
import javax.jms.TextMessage; import jakarta.jms.TextMessage;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.junit.Test; import org.junit.Test;
@ -102,7 +102,7 @@ public class PooledConnectionTempQueueTest extends JmsPoolTestSupport {
Connection con = connectionFactory.createConnection(); Connection con = connectionFactory.createConnection();
Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE); Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(session.createQueue(queueName)); MessageConsumer consumer = session.createConsumer(session.createQueue(queueName));
final javax.jms.Message inMessage = consumer.receive(); final jakarta.jms.Message inMessage = consumer.receive();
String requestMessageId = inMessage.getJMSMessageID(); String requestMessageId = inMessage.getJMSMessageID();
LOG.debug("Received message " + requestMessageId); LOG.debug("Received message " + requestMessageId);

View File

@ -19,11 +19,11 @@ package org.apache.activemq.jms.pool;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.IllegalStateException; import jakarta.jms.IllegalStateException;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.junit.Test; import org.junit.Test;

View File

@ -26,14 +26,14 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TextMessage; import jakarta.jms.TextMessage;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -24,14 +24,14 @@ import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TextMessage; import jakarta.jms.TextMessage;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -19,11 +19,11 @@ package org.apache.activemq.jms.pool;
import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.Topic; import jakarta.jms.Topic;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -22,13 +22,13 @@ import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import javax.jms.Destination; import jakarta.jms.Destination;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Queue; import jakarta.jms.Queue;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.Topic; import jakarta.jms.Topic;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -23,13 +23,13 @@ import static org.junit.Assert.assertTrue;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ExceptionListener; import jakarta.jms.ExceptionListener;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TopicConnection; import jakarta.jms.TopicConnection;
import javax.jms.TopicPublisher; import jakarta.jms.TopicPublisher;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -27,30 +27,30 @@ import java.io.IOException;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Vector; import java.util.Vector;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.QueueConnection; import jakarta.jms.QueueConnection;
import javax.jms.QueueConnectionFactory; import jakarta.jms.QueueConnectionFactory;
import javax.jms.QueueSender; import jakarta.jms.QueueSender;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TopicConnection; import jakarta.jms.TopicConnection;
import javax.jms.TopicConnectionFactory; import jakarta.jms.TopicConnectionFactory;
import javax.jms.TopicPublisher; import jakarta.jms.TopicPublisher;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import javax.jms.XAConnection; import jakarta.jms.XAConnection;
import javax.jms.XAConnectionFactory; import jakarta.jms.XAConnectionFactory;
import javax.jms.XAJMSContext; import jakarta.jms.XAJMSContext;
import javax.naming.spi.ObjectFactory; import javax.naming.spi.ObjectFactory;
import javax.transaction.HeuristicMixedException; import jakarta.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException; import jakarta.transaction.HeuristicRollbackException;
import javax.transaction.InvalidTransactionException; import jakarta.transaction.InvalidTransactionException;
import javax.transaction.NotSupportedException; import jakarta.transaction.NotSupportedException;
import javax.transaction.RollbackException; import jakarta.transaction.RollbackException;
import javax.transaction.Status; import jakarta.transaction.Status;
import javax.transaction.Synchronization; import jakarta.transaction.Synchronization;
import javax.transaction.SystemException; import jakarta.transaction.SystemException;
import javax.transaction.Transaction; import jakarta.transaction.Transaction;
import javax.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import javax.transaction.xa.XAException; import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid; import javax.transaction.xa.Xid;

View File

@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.BrokerService;

View File

@ -50,15 +50,17 @@
<dependency> <dependency>
<groupId>org.apache.geronimo.components</groupId> <groupId>org.apache.geronimo.components</groupId>
<artifactId>geronimo-transaction</artifactId> <artifactId>geronimo-transaction</artifactId>
<classifier>jakarta</classifier>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.geronimo.specs</groupId> <groupId>jakarta.transaction</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId> <artifactId>jakarta.transaction-api</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.geronimo.specs</groupId> <groupId>jakarta.annotation</groupId>
<artifactId>geronimo-annotation_1.3_spec</artifactId> <artifactId>jakarta.annotation-api</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -16,7 +16,7 @@
package org.apache.activemq.pool; package org.apache.activemq.pool;
import java.io.IOException; import java.io.IOException;
import javax.jms.Connection; import jakarta.jms.Connection;
import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.jms.pool.ConnectionPool; import org.apache.activemq.jms.pool.ConnectionPool;
import org.apache.activemq.jms.pool.JcaConnectionPool; import org.apache.activemq.jms.pool.JcaConnectionPool;

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.activemq.pool; package org.apache.activemq.pool;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.EnhancedConnection; import org.apache.activemq.EnhancedConnection;
import org.apache.activemq.advisory.DestinationSource; import org.apache.activemq.advisory.DestinationSource;

View File

@ -20,7 +20,7 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Properties; import java.util.Properties;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.naming.NamingException; import javax.naming.NamingException;
import javax.naming.Reference; import javax.naming.Reference;

View File

@ -19,11 +19,11 @@ package org.apache.activemq.pool;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.Properties; import java.util.Properties;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.XAConnection; import jakarta.jms.XAConnection;
import javax.jms.XASession; import jakarta.jms.XASession;
import javax.naming.NamingException; import javax.naming.NamingException;
import javax.naming.Reference; import javax.naming.Reference;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;

View File

@ -16,7 +16,7 @@
*/ */
package org.apache.activemq.pool; package org.apache.activemq.pool;
import javax.jms.Connection; import jakarta.jms.Connection;
import org.junit.Test; import org.junit.Test;

View File

@ -20,11 +20,11 @@ import java.io.IOException;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.MessageProducer; import jakarta.jms.MessageProducer;
import javax.jms.Session; import jakarta.jms.Session;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnection;

View File

@ -32,14 +32,14 @@ import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import javax.jms.Connection; import jakarta.jms.Connection;
import javax.jms.ConnectionFactory; import jakarta.jms.ConnectionFactory;
import javax.jms.JMSException; import jakarta.jms.JMSException;
import javax.jms.Message; import jakarta.jms.Message;
import javax.jms.MessageConsumer; import jakarta.jms.MessageConsumer;
import javax.jms.MessageListener; import jakarta.jms.MessageListener;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TextMessage; import jakarta.jms.TextMessage;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;

View File

@ -22,26 +22,26 @@ import java.io.IOException;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Vector; import java.util.Vector;
import javax.jms.QueueConnection; import jakarta.jms.QueueConnection;
import javax.jms.QueueConnectionFactory; import jakarta.jms.QueueConnectionFactory;
import javax.jms.QueueSender; import jakarta.jms.QueueSender;
import javax.jms.QueueSession; import jakarta.jms.QueueSession;
import javax.jms.Session; import jakarta.jms.Session;
import javax.jms.TopicConnection; import jakarta.jms.TopicConnection;
import javax.jms.TopicConnectionFactory; import jakarta.jms.TopicConnectionFactory;
import javax.jms.TopicPublisher; import jakarta.jms.TopicPublisher;
import javax.jms.TopicSession; import jakarta.jms.TopicSession;
import javax.naming.spi.ObjectFactory; import javax.naming.spi.ObjectFactory;
import javax.transaction.HeuristicMixedException; import jakarta.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException; import jakarta.transaction.HeuristicRollbackException;
import javax.transaction.InvalidTransactionException; import jakarta.transaction.InvalidTransactionException;
import javax.transaction.NotSupportedException; import jakarta.transaction.NotSupportedException;
import javax.transaction.RollbackException; import jakarta.transaction.RollbackException;
import javax.transaction.Status; import jakarta.transaction.Status;
import javax.transaction.Synchronization; import jakarta.transaction.Synchronization;
import javax.transaction.SystemException; import jakarta.transaction.SystemException;
import javax.transaction.Transaction; import jakarta.transaction.Transaction;
import javax.transaction.TransactionManager; import jakarta.transaction.TransactionManager;
import javax.transaction.xa.XAException; import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource; import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid; import javax.transaction.xa.Xid;