KahaDB rollback fails when connection is closed afterwards ----------------------------------------------------------
Key: AMQ-2746 URL: https://issues.apache.org/activemq/browse/AMQ-2746 Project: ActiveMQ Issue Type: Bug Components: Message Store Affects Versions: 5.3.2, 5.3.1, 5.3.0 Environment: Windows XP SP3 Sun JVM 1.5 Reporter: Liam Horne Priority: Critical KahaDB appears to not correctly handle rollback of a transacted session(Session.SESSION_TRANSACTED, transacted = true), when the session and connection is closed immediatly afterwards. The messages are either being automatically committed or have been lost. The rollback functionality on its own works correctly, its just the step of closing all our connections which must be applying unexpected behavior. Switching to AMQ persistance adapter does not have this issue and will roll back the messages succesfully. Attached is a class that demonstrates this behavior, and the activemq configuration file used in a 5.3.2 activeMQ instance General Test Case Flow -------------------------------------------------------- -Receives 5 messages on the OnMessage() method -call session.commit() -Receives 5 messages on the OnMessage() method -set messagelistener(null) -call connection.stop() -call session.rollback() -call session.close() -Set up connection and consumer to same durable subscriber -Confirm whether the messages have been rolled back succesfully when we receive the next 5 messages. If the Test Case fails on rollback it will display the following message to the console for each message. "ERROR: Failed Rollback expected version:2 actual version:3 on message:0" Test Case Setup ------------------------------------------------------ -Zipped the eclipse project folder containing this test case -Ensure the "CONNECTION" static string in ActiveMQTest.java will point to your running ActiveMQ instance. -Run the ActiveMQTest main() method. Have not tested in versions below 5.3.0 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.