Qpid
  1. Qpid
  2. QPID-3904

Java client should set AMQConnection#_closed flag on receipt of 0-10 connection.close

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.17
    • Component/s: Java Client
    • Labels:
      None

      Description

      If the broker closes the client's connection, you'd expect that future attempts to use the client connection object would report an IllegalStateException(""Object is closed") exception and AMQConnection#isClosed to return true.

      However, the 0-10 client reports "Command was interrupted because of failover, before being sent [error code 541: internal error]" and AMQConnection#isClosed reports false. This is confusing to the user.

      javax.jms.JMSException: Error closing session: org.apache.qpid.AMQException: Command was interrupted because of failover, before being sent [error code 541: internal error]
      

      It appears that the 0-10 client is current failing to flip the _closed atomic in response to a receipt of a connection.close.

      The problem does not affect 0-8..0-9-1. Its users see an IllegalStateException("Object has been closed") exception and AMQConnection#isClosed returns true in this scenario.

        Activity

        Keith Wall created issue -
        Keith Wall made changes -
        Field Original Value New Value
        Assignee Keith Wall [ k-wall ]
        Keith Wall made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Keith Wall made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Keith Wall added a comment -

        Patch applied. Andrew, could you review please?

        Show
        Keith Wall added a comment - Patch applied. Andrew, could you review please?
        Keith Wall made changes -
        Assignee Keith Wall [ k-wall ] Andrew MacBean [ macbean ]
        Robbie Gemmell made changes -
        Fix Version/s 0.17 [ 12320179 ]
        Affects Version/s 0.17 [ 12320179 ]
        Hide
        Robbie Gemmell added a comment -

        Resolving.

        Show
        Robbie Gemmell added a comment - Resolving.
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Assignee Andrew MacBean [ macbean ] Robbie Gemmell [ gemmellr ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        18h 7m 1 Keith Wall 21/Mar/12 09:46
        In Progress In Progress Reviewable Reviewable
        3h 17m 1 Keith Wall 21/Mar/12 13:03
        Reviewable Reviewable Resolved Resolved
        144d 6h 46m 1 Robbie Gemmell 12/Aug/12 20:49

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Keith Wall
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development