398399400401402403404405406407408
queue.activate(); deactivate = true; } del.acknowledge(tx); if (deactivate) { queue.deactivate(); }
396397398399400401402403404405406
310311312313314315316317318319320
if (d == null) { throw new IllegalStateException("The message " + r + " has already been acknowledged!"); } d.acknowledge(tx); log.trace(this + " acknowledged " + r); // make sure I get rid of message if the transaction is rolled back if (tx != null)
988989990991992993994995996997998
Delivery delivery = queue.handle(observer, ref1, null); assertTrue(r.getMessages().size() == 1); //simulating processing transaction delivery.acknowledge(tx); //poison pm ((FakeJDBCPersistenceManager)pm).poisonHandleCommit1PC(); //commit one phase
10131014101510161017101810191020102110221023
//restore ((FakeJDBCPersistenceManager)pm).restoreHandleCommit1PC(); //another tx tx = txRep.createTransaction(new MockXid()); delivery.acknowledge(tx); tx.commit(); //still received twice. assertTrue(r.getMessages().size() == 2); //delivering count 0
305306307308309310311312313314315
/* 396 */ queue.activate(); /* */ /* 398 */ deactivate = true; /* */ } /* */ /* 401 */ del.acknowledge(tx); /* */ /* 403 */ if (deactivate) /* */ { /* 405 */ queue.deactivate(); /* */ }