Search in sources :

Example 6 with XATransactionId

use of org.apache.activemq.command.XATransactionId in project activemq-artemis by apache.

the class ActiveMQXAConnectionFactoryTest method assertTransactionGoneFromBroker.

private void assertTransactionGoneFromBroker(Xid tid) throws Exception {
    BrokerService broker = BrokerRegistry.getInstance().lookup("localhost");
    TransactionBroker transactionBroker = (TransactionBroker) broker.getBroker().getAdaptor(TransactionBroker.class);
    try {
        transactionBroker.getTransaction(null, new XATransactionId(tid), false);
        fail("expected exception on tx not found");
    } catch (XAException expectedOnNotFound) {
    }
}
Also used : XATransactionId(org.apache.activemq.command.XATransactionId) XAException(javax.transaction.xa.XAException) TransactionBroker(org.apache.activemq.broker.TransactionBroker) BrokerService(org.apache.activemq.broker.BrokerService)

Example 7 with XATransactionId

use of org.apache.activemq.command.XATransactionId in project activemq-artemis by apache.

the class XATransactionIdTest method createObject.

@Override
public Object createObject() throws Exception {
    XATransactionId info = new XATransactionId();
    populateObject(info);
    return info;
}
Also used : XATransactionId(org.apache.activemq.command.XATransactionId)

Example 8 with XATransactionId

use of org.apache.activemq.command.XATransactionId in project activemq-artemis by apache.

the class XATransactionIdTest method populateObject.

@Override
protected void populateObject(Object object) throws Exception {
    super.populateObject(object);
    XATransactionId info = (XATransactionId) object;
    info.setFormatId(1);
    info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
    info.setBranchQualifier("BranchQualifier:2".getBytes());
}
Also used : XATransactionId(org.apache.activemq.command.XATransactionId)

Example 9 with XATransactionId

use of org.apache.activemq.command.XATransactionId in project activemq-artemis by apache.

the class XATransactionIdTest method createObject.

@Override
public Object createObject() throws Exception {
    XATransactionId info = new XATransactionId();
    populateObject(info);
    return info;
}
Also used : XATransactionId(org.apache.activemq.command.XATransactionId)

Example 10 with XATransactionId

use of org.apache.activemq.command.XATransactionId in project activemq-artemis by apache.

the class XATransactionIdTest method createObject.

@Override
public Object createObject() throws Exception {
    XATransactionId info = new XATransactionId();
    populateObject(info);
    return info;
}
Also used : XATransactionId(org.apache.activemq.command.XATransactionId)

Aggregations

XATransactionId (org.apache.activemq.command.XATransactionId)37 ActiveMQDestination (org.apache.activemq.command.ActiveMQDestination)15 ConnectionInfo (org.apache.activemq.command.ConnectionInfo)15 ConsumerInfo (org.apache.activemq.command.ConsumerInfo)15 Message (org.apache.activemq.command.Message)15 ProducerInfo (org.apache.activemq.command.ProducerInfo)15 SessionInfo (org.apache.activemq.command.SessionInfo)15 TransactionInfo (org.apache.activemq.command.TransactionInfo)11 DataArrayResponse (org.apache.activemq.command.DataArrayResponse)9 MessageAck (org.apache.activemq.command.MessageAck)9 ActiveMQTopic (org.apache.activemq.command.ActiveMQTopic)4 Response (org.apache.activemq.command.Response)4 TransactionId (org.apache.activemq.command.TransactionId)4 BrokerService (org.apache.activemq.broker.BrokerService)2 DestinationViewMBean (org.apache.activemq.broker.jmx.DestinationViewMBean)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataOutputStream (java.io.DataOutputStream)1 HashSet (java.util.HashSet)1 InstanceNotFoundException (javax.management.InstanceNotFoundException)1 XAException (javax.transaction.xa.XAException)1