// we test only non-recoverable channels now
return;
}
// add an NACKING receiver to the channel
SimpleReceiver r = new SimpleReceiver("NackingReceiver", SimpleReceiver.ACCEPTING);
assertTrue(queue.add(r));
MessageReference ref = createReference(0, false, "payload");
SimpleDeliveryObserver observer = new SimpleDeliveryObserver();
// non-transacted send, non-reliable message, one message
Delivery delivery = queue.handle(observer, ref, null);
assertTrue(delivery.isDone());
int deliveringCount = queue.getDeliveringCount();
assertEquals(1, deliveringCount);
List acknowledging = r.getMessages();
assertEquals(1, acknowledging.size());
Message ackm = (Message)acknowledging.get(0);
assertEquals(0, ackm.getMessageID());
Transaction tx = tr.createTransaction();
// transacted acknowledgment
r.acknowledge(ackm, tx);
deliveringCount = queue.getDeliveringCount();
assertEquals(1, deliveringCount);
tx.rollback();
deliveringCount = queue.getDeliveringCount();
assertEquals(1, deliveringCount);
// acknowledge non-transactionally
r.acknowledge(ackm, null);
assertTrue(queue.browse().isEmpty());
}