producerExchange.setMutable(true);
producerExchange.setConnectionContext(context);
producerExchange.setProducerState(new ProducerState(new ProducerInfo()));
final ConsumerBrokerExchange consumerExchange = new ConsumerBrokerExchange();
consumerExchange.setConnectionContext(context);
transactionStore.recover(new TransactionRecoveryListener() {
public void recover(XATransactionId xid, Message[] addedMessages, MessageAck[] aks) {
try {
beginTransaction(context, xid);
XATransaction transaction = (XATransaction) getTransaction(context, xid, false);
for (int i = 0; i < addedMessages.length; i++) {