// try and commit - and we're going to make the dummyxaresource throw an exception on commit,
// which should cause rollback to be called on the other resource
tx.delistResource(res1, XAResource.TMSUCCESS);
tx.delistResource(res2, XAResource.TMSUCCESS);
// rollback will cause an attemp to deliver messages locally to the original consumers.
// the original consumer has closed, so it will cancelled to the server
// the server cancel is asynch, so we need to sleep for a bit to make sure it completes
log.trace("Forcing failure");