* implemented by the store, and verifying the behaviour using BDB
* implementation methods.
*/
public void testTranRollbackAfterCommit() throws Exception
{
TransactionLog log = getVirtualHost().getTransactionLog();
BDBMessageStore bdbStore = assertBDBStore(log);
final AMQShortString mockQueueName = new AMQShortString("queueName");
TransactionLogResource mockQueue = new TransactionLogResource()
{
public String getResourceName()
{
return mockQueueName.asString();
}
};
TransactionLog.Transaction txn = log.newTransaction();
txn.enqueueMessage(mockQueue, 30L);
txn.commitTran();
txn = log.newTransaction();
txn.enqueueMessage(mockQueue, 31L);
txn.abortTran();
txn = log.newTransaction();
txn.enqueueMessage(mockQueue, 32L);
txn.commitTran();
List<Long> enqueuedIds = bdbStore.getEnqueuedMessages(mockQueueName);