You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Liam Horne (JIRA)" <ji...@apache.org> on 2010/05/24 16:03:54 UTC

[jira] Created: (AMQ-2746) KahaDB rollback fails when connection is closed afterwards

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.


[jira] Updated: (AMQ-2746) KahaDB rollback fails when connection is closed afterwards

Posted by "Bruce Snyder (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Snyder updated AMQ-2746:
------------------------------

    Fix Version/s: 5.5.0
                       (was: 5.4.1)

> 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.0, 5.3.1, 5.3.2
>         Environment: Windows XP SP3
> Sun JVM 1.5
>            Reporter: Liam Horne
>            Priority: Critical
>             Fix For: 5.5.0
>
>         Attachments: KahaDBRollback.zip
>
>
> 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.


[jira] Updated: (AMQ-2746) KahaDB rollback fails when connection is closed afterwards

Posted by "Liam Horne (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-2746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Liam Horne updated AMQ-2746:
----------------------------

    Attachment: KahaDBRollback.zip

> 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.0, 5.3.1, 5.3.2
>         Environment: Windows XP SP3
> Sun JVM 1.5
>            Reporter: Liam Horne
>            Priority: Critical
>         Attachments: KahaDBRollback.zip
>
>
> 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.