Search in sources :

Example 1 with ActiveMQXAResourceWrapper

use of org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapper in project activemq-artemis by apache.

the class OutgoingConnectionTest method testOutgoingXAResourceWrapper.

@Test
public void testOutgoingXAResourceWrapper() throws Exception {
    XAQueueConnection queueConnection = qraConnectionFactory.createXAQueueConnection();
    XASession s = queueConnection.createXASession();
    XAResource resource = s.getXAResource();
    assertTrue(resource instanceof ActiveMQXAResourceWrapper);
    ActiveMQXAResourceWrapperImpl xaResourceWrapper = (ActiveMQXAResourceWrapperImpl) resource;
    assertTrue(xaResourceWrapper.getJndiName().equals("java://jmsXA NodeId:" + server.getNodeID()));
    assertTrue(xaResourceWrapper.getProductVersion().equals(VersionLoader.getVersion().getFullVersion()));
    assertTrue(xaResourceWrapper.getProductName().equals(ActiveMQResourceAdapter.PRODUCT_NAME));
}
Also used : XAResource(javax.transaction.xa.XAResource) ActiveMQXAResourceWrapper(org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapper) XASession(javax.jms.XASession) XAQueueConnection(javax.jms.XAQueueConnection) ActiveMQXAResourceWrapperImpl(org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapperImpl) Test(org.junit.Test)

Aggregations

XAQueueConnection (javax.jms.XAQueueConnection)1 XASession (javax.jms.XASession)1 XAResource (javax.transaction.xa.XAResource)1 ActiveMQXAResourceWrapper (org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapper)1 ActiveMQXAResourceWrapperImpl (org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapperImpl)1 Test (org.junit.Test)1