You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jörg Henne (JIRA)" <ji...@apache.org> on 2007/08/16 13:38:23 UTC

[jira] Created: (AMQ-1364) ActiveMQConnection throws Exception when closing an already closed exception.

ActiveMQConnection throws Exception when closing an already closed exception.
-----------------------------------------------------------------------------

                 Key: AMQ-1364
                 URL: https://issues.apache.org/activemq/browse/AMQ-1364
             Project: ActiveMQ
          Issue Type: Bug
          Components: Connector
    Affects Versions: 4.1.1
            Reporter: Jörg Henne
            Priority: Minor


The {{ActiveMQConnection.close()}} explicitely states
bq. Closing a closed connection must NOT throw an exception.

But the first call in the close() implementation is to checkClosed(), which throws an exception, if the connection is already closed:

{code:language=java}
    /**
     * simply throws an exception if the Connection is already closed
     * 
     * @throws JMSException
     */
    protected synchronized void checkClosed() throws JMSException {
        if (closed.get()) {
            throw new ConnectionClosedException();
        }
    }
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1364) ActiveMQConnection throws Exception when closing an already closed exception.

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

Gary Tully resolved AMQ-1364.
-----------------------------

         Assignee: Gary Tully
    Fix Version/s: 5.2.0
                       (was: 5.3.0)
       Resolution: Fixed

probabally was fixed a lot earlier but only getting tidied out now.

> ActiveMQConnection throws Exception when closing an already closed exception.
> -----------------------------------------------------------------------------
>
>                 Key: AMQ-1364
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1364
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 4.1.1
>            Reporter: Jörg Henne
>            Assignee: Gary Tully
>            Priority: Minor
>             Fix For: 5.2.0
>
>
> The {{ActiveMQConnection.close()}} explicitely states
> bq. Closing a closed connection must NOT throw an exception.
> But the first call in the close() implementation is to checkClosed(), which throws an exception, if the connection is already closed:
> {code:language=java}
>     /**
>      * simply throws an exception if the Connection is already closed
>      * 
>      * @throws JMSException
>      */
>     protected synchronized void checkClosed() throws JMSException {
>         if (closed.get()) {
>             throw new ConnectionClosedException();
>         }
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-1364) ActiveMQConnection throws Exception when closing an already closed exception.

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

Gary Tully updated AMQ-1364:
----------------------------

    Fix Version/s: 5.3.0
                       (was: 5.2.0)

> ActiveMQConnection throws Exception when closing an already closed exception.
> -----------------------------------------------------------------------------
>
>                 Key: AMQ-1364
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1364
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Connector
>    Affects Versions: 4.1.1
>            Reporter: Jörg Henne
>            Priority: Minor
>             Fix For: 5.3.0
>
>
> The {{ActiveMQConnection.close()}} explicitely states
> bq. Closing a closed connection must NOT throw an exception.
> But the first call in the close() implementation is to checkClosed(), which throws an exception, if the connection is already closed:
> {code:language=java}
>     /**
>      * simply throws an exception if the Connection is already closed
>      * 
>      * @throws JMSException
>      */
>     protected synchronized void checkClosed() throws JMSException {
>         if (closed.get()) {
>             throw new ConnectionClosedException();
>         }
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.