* implemented by the store, and verifying the behaviour using BDB
* implementation methods.
*/
public void testTranRollbackAfterCommit() throws Exception
{
MessageStore log = getVirtualHost().getMessageStore();
AbstractBDBMessageStore bdbStore = assertBDBStore(log);
final UUID mockQueueId = UUIDGenerator.generateRandomUUID();
TransactionLogResource mockQueue = new TransactionLogResource()
{
@Override
public UUID getId()
{
return mockQueueId;
}
};
Transaction txn = log.newTransaction();
txn.enqueueMessage(mockQueue, new MockMessage(30L));
txn.commitTran();
txn = log.newTransaction();
txn.enqueueMessage(mockQueue, new MockMessage(31L));
txn.abortTran();
txn = log.newTransaction();
txn.enqueueMessage(mockQueue, new MockMessage(32L));
txn.commitTran();
List<Long> enqueuedIds = bdbStore.getEnqueuedMessages(mockQueueId);