XAResource res = sess.getXAResource();
MessageProducer prod = sess.createProducer(queue);
xid1 = new MessagingXid("list-blah1".getBytes(), 43, "list-blahblah1".getBytes());
TextMessage tm = sess.createTextMessage("message-list");
res.start(xid1, XAResource.TMNOFLAGS);
prod.send(tm);
res.end(xid1, XAResource.TMSUCCESS);
res.prepare(xid1);
}
{
XASession sess = conn.createXASession();
XAResource res = sess.getXAResource();
MessageProducer prod = sess.createProducer(queue);
xid2 = new MessagingXid("list-blah2".getBytes(), 43, "list-blahblah2".getBytes());
TextMessage tm = sess.createTextMessage("message1-list");
res.start(xid2, XAResource.TMNOFLAGS);