mirror of https://github.com/apache/activemq.git
[AMQ-9239] jakarta.jms - activemq-jms-pool, activemq-pool changes
This commit is contained in:
parent
ef0b6dd0f2
commit
30114aa86d
|
@ -43,19 +43,20 @@
|
|||
<groupId>jakarta.jms</groupId>
|
||||
<artifactId>jakarta.jms-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.transaction</groupId>
|
||||
<artifactId>jakarta.transaction-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.components</groupId>
|
||||
<artifactId>geronimo-transaction</artifactId>
|
||||
<classifier>jakarta</classifier>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
||||
<optional>true</optional>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
|
|
|
@ -21,13 +21,13 @@ import java.util.List;
|
|||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.IllegalStateException;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TemporaryQueue;
|
||||
import javax.jms.TemporaryTopic;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ExceptionListener;
|
||||
import jakarta.jms.IllegalStateException;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TemporaryQueue;
|
||||
import jakarta.jms.TemporaryTopic;
|
||||
|
||||
import org.apache.commons.pool2.KeyedPooledObjectFactory;
|
||||
import org.apache.commons.pool2.PooledObject;
|
||||
|
|
|
@ -18,13 +18,13 @@ package org.apache.activemq.jms.pool;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.XAConnection;
|
||||
import javax.jms.XAConnectionFactory;
|
||||
import javax.jms.XASession;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.TransactionManager;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.XAConnection;
|
||||
import jakarta.jms.XAConnectionFactory;
|
||||
import jakarta.jms.XASession;
|
||||
import jakarta.transaction.SystemException;
|
||||
import jakarta.transaction.TransactionManager;
|
||||
|
||||
import javax.transaction.xa.XAResource;
|
||||
import org.apache.geronimo.transaction.manager.NamedXAResourceFactory;
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.XASession;
|
||||
import javax.transaction.TransactionManager;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.XASession;
|
||||
import jakarta.transaction.TransactionManager;
|
||||
import javax.transaction.xa.XAResource;
|
||||
|
||||
import org.apache.geronimo.transaction.manager.WrapperNamedXAResource;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import jakarta.jms.Connection;
|
||||
|
||||
public class JcaPooledConnectionFactory extends XaPooledConnectionFactory {
|
||||
|
||||
|
|
|
@ -19,23 +19,23 @@ package org.apache.activemq.jms.pool;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionConsumer;
|
||||
import javax.jms.ConnectionMetaData;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.IllegalStateException;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.QueueConnection;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.ServerSessionPool;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TemporaryQueue;
|
||||
import javax.jms.TemporaryTopic;
|
||||
import javax.jms.Topic;
|
||||
import javax.jms.TopicConnection;
|
||||
import javax.jms.TopicSession;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionConsumer;
|
||||
import jakarta.jms.ConnectionMetaData;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.ExceptionListener;
|
||||
import jakarta.jms.IllegalStateException;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.QueueConnection;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.ServerSessionPool;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TemporaryQueue;
|
||||
import jakarta.jms.TemporaryTopic;
|
||||
import jakarta.jms.Topic;
|
||||
import jakarta.jms.TopicConnection;
|
||||
import jakarta.jms.TopicSession;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
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
|
||||
*/
|
||||
@Override
|
||||
|
@ -227,7 +227,7 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
|
|||
|
||||
/**
|
||||
*
|
||||
* @see javax.jms.ConnectionConsumer
|
||||
* @see jakarta.jms.ConnectionConsumer
|
||||
* @since 2.0
|
||||
*/
|
||||
@Override
|
||||
|
@ -261,7 +261,7 @@ public class PooledConnection implements TopicConnection, QueueConnection, Poole
|
|||
return pool.getConnection();
|
||||
}
|
||||
|
||||
protected void assertNotClosed() throws javax.jms.IllegalStateException {
|
||||
protected void assertNotClosed() throws jakarta.jms.IllegalStateException {
|
||||
if (stopped || pool == null) {
|
||||
throw new IllegalStateException("Connection closed");
|
||||
}
|
||||
|
|
|
@ -21,14 +21,14 @@ import java.util.Properties;
|
|||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSContext;
|
||||
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.JMSContext;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.QueueConnection;
|
||||
import jakarta.jms.QueueConnectionFactory;
|
||||
import jakarta.jms.TopicConnection;
|
||||
import jakarta.jms.TopicConnectionFactory;
|
||||
|
||||
import org.apache.commons.pool2.KeyedPooledObjectFactory;
|
||||
import org.apache.commons.pool2.PooledObject;
|
||||
|
@ -181,7 +181,7 @@ public class PooledConnectionFactory implements ConnectionFactory, QueueConnecti
|
|||
if (toUse instanceof ConnectionFactory) {
|
||||
this.connectionFactory = toUse;
|
||||
} 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());
|
||||
}
|
||||
} else {
|
||||
throw new IllegalStateException("connectionFactory should implement javax.jms.ConnectionFactory");
|
||||
throw new IllegalStateException("connectionFactory should implement jakarta.jms.ConnectionFactory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageListener;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageListener;
|
||||
|
||||
/**
|
||||
* A {@link MessageConsumer} which was created by {@link PooledSession}.
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.CompletionListener;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.InvalidDestinationException;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageProducer;
|
||||
import jakarta.jms.CompletionListener;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.InvalidDestinationException;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageProducer;
|
||||
|
||||
/**
|
||||
* A pooled {@link MessageProducer}
|
||||
|
@ -107,7 +107,7 @@ public class PooledProducer implements MessageProducer {
|
|||
* specified.
|
||||
* @throws InvalidDestinationException if a client uses this method with an
|
||||
* invalid destination.
|
||||
* @see javax.jms.Session#createProducer
|
||||
* @see jakarta.jms.Session#createProducer
|
||||
* @since 2.0
|
||||
*/
|
||||
@Override
|
||||
|
@ -151,7 +151,7 @@ public class PooledProducer implements MessageProducer {
|
|||
* Gets the delivery delay value for this <CODE>MessageProducer</CODE>.
|
||||
*
|
||||
* @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.
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.QueueSender;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.QueueSender;
|
||||
|
||||
/**
|
||||
* {@link QueueSender} instance that is created and managed by the PooledConnection.
|
||||
|
|
|
@ -21,30 +21,30 @@ import java.util.Iterator;
|
|||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import javax.jms.BytesMessage;
|
||||
import javax.jms.Destination;
|
||||
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.ObjectMessage;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.QueueBrowser;
|
||||
import javax.jms.QueueReceiver;
|
||||
import javax.jms.QueueSender;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.StreamMessage;
|
||||
import javax.jms.TemporaryQueue;
|
||||
import javax.jms.TemporaryTopic;
|
||||
import javax.jms.TextMessage;
|
||||
import javax.jms.Topic;
|
||||
import javax.jms.TopicPublisher;
|
||||
import javax.jms.TopicSession;
|
||||
import javax.jms.TopicSubscriber;
|
||||
import javax.jms.XASession;
|
||||
import jakarta.jms.BytesMessage;
|
||||
import jakarta.jms.Destination;
|
||||
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.ObjectMessage;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.QueueBrowser;
|
||||
import jakarta.jms.QueueReceiver;
|
||||
import jakarta.jms.QueueSender;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.StreamMessage;
|
||||
import jakarta.jms.TemporaryQueue;
|
||||
import jakarta.jms.TemporaryTopic;
|
||||
import jakarta.jms.TextMessage;
|
||||
import jakarta.jms.Topic;
|
||||
import jakarta.jms.TopicPublisher;
|
||||
import jakarta.jms.TopicSession;
|
||||
import jakarta.jms.TopicSubscriber;
|
||||
import jakarta.jms.XASession;
|
||||
import javax.transaction.xa.XAResource;
|
||||
|
||||
import org.apache.commons.pool2.KeyedObjectPool;
|
||||
|
@ -152,7 +152,7 @@ public class PooledSession implements Session, TopicSession, QueueSession, XASes
|
|||
try {
|
||||
sessionPool.returnObject(key, sessionHolder);
|
||||
} 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);
|
||||
throw illegalStateException;
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.TemporaryQueue;
|
||||
import javax.jms.TemporaryTopic;
|
||||
import jakarta.jms.TemporaryQueue;
|
||||
import jakarta.jms.TemporaryTopic;
|
||||
|
||||
interface PooledSessionEventListener {
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.Topic;
|
||||
import javax.jms.TopicPublisher;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.Topic;
|
||||
import jakarta.jms.TopicPublisher;
|
||||
|
||||
/**
|
||||
* A {@link TopicPublisher} instance that is created and managed by a PooledConnection.
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.QueueSender;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TopicPublisher;
|
||||
import javax.jms.TopicSession;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.QueueSender;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TopicPublisher;
|
||||
import jakarta.jms.TopicSession;
|
||||
|
||||
/**
|
||||
* Used to store a pooled session instance and any resources that can
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
*/
|
||||
package org.apache.activemq.jms.pool;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.XAConnection;
|
||||
import javax.transaction.RollbackException;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.TransactionManager;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.XAConnection;
|
||||
import jakarta.transaction.RollbackException;
|
||||
import jakarta.transaction.Status;
|
||||
import jakarta.transaction.SystemException;
|
||||
import jakarta.transaction.TransactionManager;
|
||||
import javax.transaction.xa.XAResource;
|
||||
|
||||
/**
|
||||
|
@ -87,7 +87,7 @@ public class XaConnectionPool extends ConnectionPool {
|
|||
return session.getXAResource();
|
||||
}
|
||||
|
||||
protected class Synchronization implements javax.transaction.Synchronization {
|
||||
protected class Synchronization implements jakarta.transaction.Synchronization {
|
||||
private final PooledSession session;
|
||||
|
||||
private Synchronization(PooledSession session) {
|
||||
|
|
|
@ -19,16 +19,16 @@ package org.apache.activemq.jms.pool;
|
|||
import java.io.Serializable;
|
||||
import java.util.Hashtable;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.XAConnectionFactory;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.XAConnectionFactory;
|
||||
import javax.naming.Binding;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.Name;
|
||||
import javax.naming.NamingEnumeration;
|
||||
import javax.naming.spi.ObjectFactory;
|
||||
import javax.transaction.TransactionManager;
|
||||
import jakarta.transaction.TransactionManager;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -81,7 +81,7 @@ public class XaPooledConnectionFactory extends PooledConnectionFactory implement
|
|||
return ((XAConnectionFactory) connectionFactory).createXAConnection(key.getUserName(), key.getPassword());
|
||||
}
|
||||
} else {
|
||||
throw new IllegalStateException("connectionFactory should implement javax.jms.XAConnectionFactory");
|
||||
throw new IllegalStateException("connectionFactory should implement jakarta.jms.XAConnectionFactory");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
@ -116,7 +116,7 @@ public class ConnectionExpiryEvictsFromPoolTest extends JmsPoolTestSupport {
|
|||
try {
|
||||
// any operation on session first checks whether session is closed
|
||||
s.getTransacted();
|
||||
} catch (javax.jms.IllegalStateException e) {
|
||||
} catch (jakarta.jms.IllegalStateException e) {
|
||||
assertTrue("Session should be fine, instead: " + e.getMessage(), false);
|
||||
}
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ package org.apache.activemq.jms.pool;
|
|||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.apache.activemq.jms.pool;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.JMSException;
|
||||
import javax.management.MalformedObjectNameException;
|
||||
import javax.management.ObjectName;
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
|
|
@ -25,11 +25,11 @@ import java.util.concurrent.Executors;
|
|||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.QueueConnectionFactory;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TopicConnectionFactory;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.QueueConnectionFactory;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TopicConnectionFactory;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
|
|
|
@ -18,11 +18,11 @@ package org.apache.activemq.jms.pool;
|
|||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.Topic;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.Topic;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -24,12 +24,12 @@ import static org.junit.Assert.fail;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ExceptionListener;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -23,13 +23,13 @@ import static org.junit.Assert.fail;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.JMSSecurityException;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ExceptionListener;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.JMSSecurityException;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerPlugin;
|
||||
|
|
|
@ -23,11 +23,11 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -21,11 +21,11 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
import java.net.URI;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TemporaryQueue;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TemporaryQueue;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -18,15 +18,15 @@ package org.apache.activemq.jms.pool;
|
|||
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TemporaryQueue;
|
||||
import javax.jms.TextMessage;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TemporaryQueue;
|
||||
import jakarta.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.junit.Test;
|
||||
|
@ -102,7 +102,7 @@ public class PooledConnectionTempQueueTest extends JmsPoolTestSupport {
|
|||
Connection con = connectionFactory.createConnection();
|
||||
Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
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();
|
||||
LOG.debug("Received message " + requestMessageId);
|
||||
|
|
|
@ -19,11 +19,11 @@ package org.apache.activemq.jms.pool;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.IllegalStateException;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.IllegalStateException;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.junit.Test;
|
||||
|
|
|
@ -26,14 +26,14 @@ import java.util.concurrent.ExecutorService;
|
|||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.Destination;
|
||||
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.ConnectionFactory;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -24,14 +24,14 @@ import java.util.concurrent.CyclicBarrier;
|
|||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.Destination;
|
||||
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.ConnectionFactory;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TextMessage;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -19,11 +19,11 @@ package org.apache.activemq.jms.pool;
|
|||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.Topic;
|
||||
import javax.jms.TopicSession;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.Topic;
|
||||
import jakarta.jms.TopicSession;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -22,13 +22,13 @@ import static org.junit.Assert.assertSame;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import javax.jms.Destination;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Queue;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.Topic;
|
||||
import javax.jms.TopicSession;
|
||||
import jakarta.jms.Destination;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Queue;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.Topic;
|
||||
import jakarta.jms.TopicSession;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -23,13 +23,13 @@ import static org.junit.Assert.assertTrue;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ExceptionListener;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TopicConnection;
|
||||
import javax.jms.TopicPublisher;
|
||||
import javax.jms.TopicSession;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ExceptionListener;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TopicConnection;
|
||||
import jakarta.jms.TopicPublisher;
|
||||
import jakarta.jms.TopicSession;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -27,30 +27,30 @@ import java.io.IOException;
|
|||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.QueueConnection;
|
||||
import javax.jms.QueueConnectionFactory;
|
||||
import javax.jms.QueueSender;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TopicConnection;
|
||||
import javax.jms.TopicConnectionFactory;
|
||||
import javax.jms.TopicPublisher;
|
||||
import javax.jms.TopicSession;
|
||||
import javax.jms.XAConnection;
|
||||
import javax.jms.XAConnectionFactory;
|
||||
import javax.jms.XAJMSContext;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.QueueConnection;
|
||||
import jakarta.jms.QueueConnectionFactory;
|
||||
import jakarta.jms.QueueSender;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TopicConnection;
|
||||
import jakarta.jms.TopicConnectionFactory;
|
||||
import jakarta.jms.TopicPublisher;
|
||||
import jakarta.jms.TopicSession;
|
||||
import jakarta.jms.XAConnection;
|
||||
import jakarta.jms.XAConnectionFactory;
|
||||
import jakarta.jms.XAJMSContext;
|
||||
import javax.naming.spi.ObjectFactory;
|
||||
import javax.transaction.HeuristicMixedException;
|
||||
import javax.transaction.HeuristicRollbackException;
|
||||
import javax.transaction.InvalidTransactionException;
|
||||
import javax.transaction.NotSupportedException;
|
||||
import javax.transaction.RollbackException;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.Synchronization;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.Transaction;
|
||||
import javax.transaction.TransactionManager;
|
||||
import jakarta.transaction.HeuristicMixedException;
|
||||
import jakarta.transaction.HeuristicRollbackException;
|
||||
import jakarta.transaction.InvalidTransactionException;
|
||||
import jakarta.transaction.NotSupportedException;
|
||||
import jakarta.transaction.RollbackException;
|
||||
import jakarta.transaction.Status;
|
||||
import jakarta.transaction.Synchronization;
|
||||
import jakarta.transaction.SystemException;
|
||||
import jakarta.transaction.Transaction;
|
||||
import jakarta.transaction.TransactionManager;
|
||||
import javax.transaction.xa.XAException;
|
||||
import javax.transaction.xa.XAResource;
|
||||
import javax.transaction.xa.Xid;
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.concurrent.CountDownLatch;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
|
|
|
@ -50,15 +50,17 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.geronimo.components</groupId>
|
||||
<artifactId>geronimo-transaction</artifactId>
|
||||
<classifier>jakarta</classifier>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||
<groupId>jakarta.transaction</groupId>
|
||||
<artifactId>jakarta.transaction-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-annotation_1.3_spec</artifactId>
|
||||
<groupId>jakarta.annotation</groupId>
|
||||
<artifactId>jakarta.annotation-api</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
package org.apache.activemq.pool;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.jms.Connection;
|
||||
import jakarta.jms.Connection;
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.jms.pool.ConnectionPool;
|
||||
import org.apache.activemq.jms.pool.JcaConnectionPool;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.apache.activemq.pool;
|
||||
|
||||
import javax.jms.JMSException;
|
||||
import jakarta.jms.JMSException;
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
import org.apache.activemq.EnhancedConnection;
|
||||
import org.apache.activemq.advisory.DestinationSource;
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.io.IOException;
|
|||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import jakarta.jms.Connection;
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.Reference;
|
||||
|
||||
|
|
|
@ -19,11 +19,11 @@ package org.apache.activemq.pool;
|
|||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.XAConnection;
|
||||
import javax.jms.XASession;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.XAConnection;
|
||||
import jakarta.jms.XASession;
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.Reference;
|
||||
import javax.transaction.xa.XAResource;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.apache.activemq.pool;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import jakarta.jms.Connection;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ import java.io.IOException;
|
|||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.MessageProducer;
|
||||
import javax.jms.Session;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.MessageProducer;
|
||||
import jakarta.jms.Session;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.apache.activemq.ActiveMQConnection;
|
||||
|
|
|
@ -32,14 +32,14 @@ import org.junit.Test;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.ConnectionFactory;
|
||||
import javax.jms.JMSException;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.MessageConsumer;
|
||||
import javax.jms.MessageListener;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
import jakarta.jms.Connection;
|
||||
import jakarta.jms.ConnectionFactory;
|
||||
import jakarta.jms.JMSException;
|
||||
import jakarta.jms.Message;
|
||||
import jakarta.jms.MessageConsumer;
|
||||
import jakarta.jms.MessageListener;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TextMessage;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
|
|
@ -22,26 +22,26 @@ import java.io.IOException;
|
|||
import java.util.Hashtable;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.jms.QueueConnection;
|
||||
import javax.jms.QueueConnectionFactory;
|
||||
import javax.jms.QueueSender;
|
||||
import javax.jms.QueueSession;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TopicConnection;
|
||||
import javax.jms.TopicConnectionFactory;
|
||||
import javax.jms.TopicPublisher;
|
||||
import javax.jms.TopicSession;
|
||||
import jakarta.jms.QueueConnection;
|
||||
import jakarta.jms.QueueConnectionFactory;
|
||||
import jakarta.jms.QueueSender;
|
||||
import jakarta.jms.QueueSession;
|
||||
import jakarta.jms.Session;
|
||||
import jakarta.jms.TopicConnection;
|
||||
import jakarta.jms.TopicConnectionFactory;
|
||||
import jakarta.jms.TopicPublisher;
|
||||
import jakarta.jms.TopicSession;
|
||||
import javax.naming.spi.ObjectFactory;
|
||||
import javax.transaction.HeuristicMixedException;
|
||||
import javax.transaction.HeuristicRollbackException;
|
||||
import javax.transaction.InvalidTransactionException;
|
||||
import javax.transaction.NotSupportedException;
|
||||
import javax.transaction.RollbackException;
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.Synchronization;
|
||||
import javax.transaction.SystemException;
|
||||
import javax.transaction.Transaction;
|
||||
import javax.transaction.TransactionManager;
|
||||
import jakarta.transaction.HeuristicMixedException;
|
||||
import jakarta.transaction.HeuristicRollbackException;
|
||||
import jakarta.transaction.InvalidTransactionException;
|
||||
import jakarta.transaction.NotSupportedException;
|
||||
import jakarta.transaction.RollbackException;
|
||||
import jakarta.transaction.Status;
|
||||
import jakarta.transaction.Synchronization;
|
||||
import jakarta.transaction.SystemException;
|
||||
import jakarta.transaction.Transaction;
|
||||
import jakarta.transaction.TransactionManager;
|
||||
import javax.transaction.xa.XAException;
|
||||
import javax.transaction.xa.XAResource;
|
||||
import javax.transaction.xa.Xid;
|
||||
|
|
Loading…
Reference in New Issue