[jboss-jira] [JBoss JIRA] Closed: (JBMESSAGING-899) QueueTest::testClosedConsumerAfterStart fails because a possible anti-pattern

Ovidiu Feodorov (JIRA) jira-events at lists.jboss.org
Wed Feb 28 04:58:36 EST 2007


     [ http://jira.jboss.com/jira/browse/JBMESSAGING-899?page=all ]

Ovidiu Feodorov closed JBMESSAGING-899.
---------------------------------------

    Resolution: Rejected

Invalid test.

You created a transacted session s2, but did not commit any transaction to acknowledge deliveries.

In order to have the test passing, you need to either use a non-transacted session with AUTO_ACKNOWLEDGE, or commit the transaction after receiving batches of 20 messages.

In both cases, I've checked and the test passes indeed.

            // JMS 1.1 Specifications, Section 4.3.5:
            // "Closing a connection must roll back the transactions in progress on its
            // transacted sessions*.
            // *) The term 'transacted session' refers to the case where a session's commit and
            // rollback methods are used to demarcate a transaction local to the session. In the
            // case where a session's work is coordinated by an external transaction manager, a
            // session's commit and rollback methods are not used and the result of a closed
            // session's work is determined later by the transaction manager.

> QueueTest::testClosedConsumerAfterStart fails because a possible anti-pattern
> -----------------------------------------------------------------------------
>
>                 Key: JBMESSAGING-899
>                 URL: http://jira.jboss.com/jira/browse/JBMESSAGING-899
>             Project: JBoss Messaging
>          Issue Type: Bug
>            Reporter: Clebert Suconic
>         Assigned To: Clebert Suconic
>            Priority: Blocker
>             Fix For: 1.2.0.GA
>
>
> If this anti-pattern is being used:
> MessageConsumer c2 = s2.createConsumer(queue);
> conn2.start();
> c2.close();
> c2 = s2.createConsumer(queue);
> We might loose messages until we restart the server.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list