// of Mark Little's book Java Transaction processing
// for a discussion of how different app serves deal with this)
// The way jboss messaging (and jboss mq) deals with this is to convert any work done
// prior to when the xasession is enlisted in the tx, into work done in the xa tx
tx.delistResource(res, XAResource.TMSUCCESS);
// Now rollback the tx - this should cause redelivery of the two messages
tm.rollback();
count = (Integer)ServerManagement.getAttribute(queueMBean, "MessageCount");