53985399540054015402540354045405540654075408
deliveringCount = queue.getDeliveringCount(); assertEquals(1, deliveringCount); // acknowledge non-transactionally r.acknowledge(ackm, null); assertTrue(queue.browse().isEmpty()); }
54465447544854495450545154525453545454555456
for(Iterator i = r.getMessages().iterator(); i.hasNext();) { Message ackm = (Message)i.next(); // non-transacted acknowledgment r.acknowledge(ackm, null); } assertTrue(queue.browse().isEmpty()); }
54915492549354945495549654975498549955005501
for(Iterator i = r.getMessages().iterator(); i.hasNext();) { Message ackm = (Message)i.next(); // transacted acknowledgment r.acknowledge(ackm, tx); } assertEquals(NUMBER_OF_MESSAGES, queue.getDeliveringCount()); tx.commit();
55405541554255435544554555465547554855495550
for(Iterator i = r.getMessages().iterator(); i.hasNext();) { Message ackm = (Message)i.next(); // transacted acknowledgment r.acknowledge(ackm, tx); } assertEquals(NUMBER_OF_MESSAGES, queue.getDeliveringCount()); tx.rollback();
55545555555655575558555955605561556255635564
// acknowledge non-transactionally for(Iterator i = r.getMessages().iterator(); i.hasNext();) { Message ackm = (Message)i.next(); // non-transacted acknowledgment r.acknowledge(ackm, null); } assertTrue(queue.browse().isEmpty()); }
56125613561456155616561756185619562056215622
assertEquals(1, acknowledging.size()); Message ackm = (Message)acknowledging.get(0); assertEquals(0, ackm.getMessageID()); // non-transacted acknowledgment r.acknowledge(ackm, null); assertTrue(queue.browse().isEmpty()); } //////////
56635664566556665667566856695670567156725673
57175718571957205721572257235724572557265727
57685769577057715772577357745775577657775778
58215822582358245825582658275828582958305831