49954996499749984999500050015002500350045005
r.acknowledge(ackm, tx); deliveringCount = queue.getDeliveringCount(); assertEquals(1, deliveringCount); tx.rollback(); deliveringCount = queue.getDeliveringCount(); assertEquals(1, deliveringCount); // acknowledge non-transactionally
51465147514851495150515151525153515451555156
r.acknowledge(ackm, tx); } assertEquals(NUMBER_OF_MESSAGES, queue.getDeliveringCount()); tx.rollback(); assertEquals(NUMBER_OF_MESSAGES, queue.getDeliveringCount()); // acknowledge non-transactionally for(Iterator i = r.getMessages().iterator(); i.hasNext();)
53925393539453955396539753985399540054015402
55455546554755485549555055515552555355545555
58695870587158725873587458755876587758785879
// no message at the receiver assertTrue(r.getMessages().isEmpty()); tx.rollback(); // no messages in the channel assertEquals(0, queue.browse().size()); // no message at the receiver
59155916591759185919592059215922592359245925
assertEquals(0, queue.browse().size()); // no message at the receiver assertTrue(r.getMessages().isEmpty()); tx.rollback(); // no messages in the channel assertEquals(0, queue.browse().size()); // no message at the receiver
59605961596259635964596559665967596859695970
60066007600860096010601160126013601460156016
60526053605460556056605760586059606060616062
11991200120112021203120412051206120712081209
queue.handle(observer, ref, tx); // no messages in the channel yet assertEquals(0, queue.browse().size()); tx.rollback(); // still no messages in the channel assertEquals(0, queue.browse().size()); }