You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Grant Patterson (JIRA)" <ji...@apache.org> on 2010/06/30 05:52:50 UTC

[jira] Created: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

JMS transport prevents clean Axis2 shutdown
-------------------------------------------

                 Key: AXIS2-4759
                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
             Project: Axis2
          Issue Type: Bug
          Components: transports
    Affects Versions: 1.5.1
         Environment: Tomcat 6.0
Open MQ 4.3
            Reporter: Grant Patterson


JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.

ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.

I have fixed this issue and will upload a patch.

The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
 - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
 - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4759:
--------------------------------------

    Assignee: Andreas Veithen

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4759.
------------------------------------

    Resolution: Fixed

Applied both patches. Thanks for your contribution!

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759-sender.patch

Proper shutdown of Axis2 is also being prevented by the shared JMS connections of the JMSConnectionFactory instances used by JMSSender.

I have attached a patch that adds a stop() method to JMSConnectionFactory that will close the shared JMS connection. I have also added stop() methods to JMSConnectionFactoryManager and JMSSender to invoke JMSConnectionFactory.stop() when Axis2 stops its TransportSenders.

Currently Axis2 stops the TransportSenders from ListenerManager.stop(). This ensures all senders are shut down if the ListenerManager has been started. If the ListenerManager hasn't been started (as is the usual case for web service clients), then the TransportSenders aren't stopped, and JMSSender's shared JMS connection remain open, preventing a clean shutdown.

Ideally, TransportSenders should be stopped from code that is always executed on shutdown. Perhaps from ConfigurationContext.terminate(). This is a problem with the Axis2 kernel and is not addressed by this patch.


The patch also synchronizes creation of JMSConnectionFactory's shared connection.

Under heavy load, JMSConnectionFactory was creating several shared JMS connections, but only keeping a reference to one of them. The unreferenced connections weren't being closed, preventing the application from closing. Synchronizing the getSharedConnection() method ensures only one shared JMS connection is created and it's reference is visible to other threads.

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759.patch

Attached the patch

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4759:
--------------------------------------

    Assignee: Andreas Veithen

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4759.
------------------------------------

    Resolution: Fixed

Applied both patches. Thanks for your contribution!

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759.patch

Attached the patch

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4759:
--------------------------------------

    Assignee: Andreas Veithen

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759.patch

Attached the patch

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759-sender.patch

Proper shutdown of Axis2 is also being prevented by the shared JMS connections of the JMSConnectionFactory instances used by JMSSender.

I have attached a patch that adds a stop() method to JMSConnectionFactory that will close the shared JMS connection. I have also added stop() methods to JMSConnectionFactoryManager and JMSSender to invoke JMSConnectionFactory.stop() when Axis2 stops its TransportSenders.

Currently Axis2 stops the TransportSenders from ListenerManager.stop(). This ensures all senders are shut down if the ListenerManager has been started. If the ListenerManager hasn't been started (as is the usual case for web service clients), then the TransportSenders aren't stopped, and JMSSender's shared JMS connection remain open, preventing a clean shutdown.

Ideally, TransportSenders should be stopped from code that is always executed on shutdown. Perhaps from ConfigurationContext.terminate(). This is a problem with the Axis2 kernel and is not addressed by this patch.


The patch also synchronizes creation of JMSConnectionFactory's shared connection.

Under heavy load, JMSConnectionFactory was creating several shared JMS connections, but only keeping a reference to one of them. The unreferenced connections weren't being closed, preventing the application from closing. Synchronizing the getSharedConnection() method ensures only one shared JMS connection is created and it's reference is visible to other threads.

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4759:
--------------------------------------

    Assignee: Andreas Veithen

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Assigned: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4759:
--------------------------------------

    Assignee: Andreas Veithen

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4759.
------------------------------------

    Resolution: Fixed

Applied both patches. Thanks for your contribution!

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759.patch

Attached the patch

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759-sender.patch

Proper shutdown of Axis2 is also being prevented by the shared JMS connections of the JMSConnectionFactory instances used by JMSSender.

I have attached a patch that adds a stop() method to JMSConnectionFactory that will close the shared JMS connection. I have also added stop() methods to JMSConnectionFactoryManager and JMSSender to invoke JMSConnectionFactory.stop() when Axis2 stops its TransportSenders.

Currently Axis2 stops the TransportSenders from ListenerManager.stop(). This ensures all senders are shut down if the ListenerManager has been started. If the ListenerManager hasn't been started (as is the usual case for web service clients), then the TransportSenders aren't stopped, and JMSSender's shared JMS connection remain open, preventing a clean shutdown.

Ideally, TransportSenders should be stopped from code that is always executed on shutdown. Perhaps from ConfigurationContext.terminate(). This is a problem with the Axis2 kernel and is not addressed by this patch.


The patch also synchronizes creation of JMSConnectionFactory's shared connection.

Under heavy load, JMSConnectionFactory was creating several shared JMS connections, but only keeping a reference to one of them. The unreferenced connections weren't being closed, preventing the application from closing. Synchronizing the getSharedConnection() method ensures only one shared JMS connection is created and it's reference is visible to other threads.

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4759.
------------------------------------

    Resolution: Fixed

Applied both patches. Thanks for your contribution!

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759.patch

Attached the patch

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Resolved: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4759.
------------------------------------

    Resolution: Fixed

Applied both patches. Thanks for your contribution!

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>            Assignee: Andreas Veithen
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759-sender.patch

Proper shutdown of Axis2 is also being prevented by the shared JMS connections of the JMSConnectionFactory instances used by JMSSender.

I have attached a patch that adds a stop() method to JMSConnectionFactory that will close the shared JMS connection. I have also added stop() methods to JMSConnectionFactoryManager and JMSSender to invoke JMSConnectionFactory.stop() when Axis2 stops its TransportSenders.

Currently Axis2 stops the TransportSenders from ListenerManager.stop(). This ensures all senders are shut down if the ListenerManager has been started. If the ListenerManager hasn't been started (as is the usual case for web service clients), then the TransportSenders aren't stopped, and JMSSender's shared JMS connection remain open, preventing a clean shutdown.

Ideally, TransportSenders should be stopped from code that is always executed on shutdown. Perhaps from ConfigurationContext.terminate(). This is a problem with the Axis2 kernel and is not addressed by this patch.


The patch also synchronizes creation of JMSConnectionFactory's shared connection.

Under heavy load, JMSConnectionFactory was creating several shared JMS connections, but only keeping a reference to one of them. The unreferenced connections weren't being closed, preventing the application from closing. Synchronizing the getSharedConnection() method ensures only one shared JMS connection is created and it's reference is visible to other threads.

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[jira] Updated: (AXIS2-4759) JMS transport prevents clean Axis2 shutdown

Posted by "Grant Patterson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Grant Patterson updated AXIS2-4759:
-----------------------------------

    Attachment: AXIS2-4759-sender.patch

Proper shutdown of Axis2 is also being prevented by the shared JMS connections of the JMSConnectionFactory instances used by JMSSender.

I have attached a patch that adds a stop() method to JMSConnectionFactory that will close the shared JMS connection. I have also added stop() methods to JMSConnectionFactoryManager and JMSSender to invoke JMSConnectionFactory.stop() when Axis2 stops its TransportSenders.

Currently Axis2 stops the TransportSenders from ListenerManager.stop(). This ensures all senders are shut down if the ListenerManager has been started. If the ListenerManager hasn't been started (as is the usual case for web service clients), then the TransportSenders aren't stopped, and JMSSender's shared JMS connection remain open, preventing a clean shutdown.

Ideally, TransportSenders should be stopped from code that is always executed on shutdown. Perhaps from ConfigurationContext.terminate(). This is a problem with the Axis2 kernel and is not addressed by this patch.


The patch also synchronizes creation of JMSConnectionFactory's shared connection.

Under heavy load, JMSConnectionFactory was creating several shared JMS connections, but only keeping a reference to one of them. The unreferenced connections weren't being closed, preventing the application from closing. Synchronizing the getSharedConnection() method ensures only one shared JMS connection is created and it's reference is visible to other threads.

> JMS transport prevents clean Axis2 shutdown
> -------------------------------------------
>
>                 Key: AXIS2-4759
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4759
>             Project: Axis2
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.5.1
>         Environment: Tomcat 6.0
> Open MQ 4.3
>            Reporter: Grant Patterson
>         Attachments: AXIS2-4759-sender.patch, AXIS2-4759.patch
>
>
> JMSListener doesn't close its JMS connections on shutdown. Open MQ connections have two threads that terminate when the connection is closed (imqConnectionFlowControl-0 and iMQReadChannel-0). If the connection isn't closed on shutdown then these threads prevent Axis2 and Tomcat from shutting down normally.
> ServiceTaskManager is responsible for the JMS connections. On shutdown, it calls Connection.stop() rather than Connection.close(). This pauses the connection rather than closing it, and in the case of Open MQ the two connection threads remain running.
> I have fixed this issue and will upload a patch.
> The patch replaces the stop() call with a close() call and fixes several other issues with that were exposed once the connection was properly closed:
>  - double-checked locking and synchronization on the wrong monitor when creating a new shared connection
>  - Qpid deadlocks if a session's connection is closed on another thread while the session is closing. This caused the unit tests to fail.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org