You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Raymond Feng (JIRA)" <ji...@apache.org> on 2008/03/31 19:42:24 UTC

[jira] Created: (AXIS2-3685) org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver

org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver
----------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-3685
                 URL: https://issues.apache.org/jira/browse/AXIS2-3685
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: transports
    Affects Versions: 1.3
            Reporter: Raymond Feng


In JMSListener.start(), there is a thread pool created for the JMSMessageReceiver. But the thread pool is not shutdown in the stop() method. As a result, the java process cannot be terminated gracefully unless System.exit() is called.

   public void start() throws AxisFault {
        // create thread pool of workers
        ExecutorService workerPool = new ThreadPoolExecutor(
                1,
                WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
                new LinkedBlockingQueue(),
                new org.apache.axis2.util.threadpool.DefaultThreadFactory(
                        new ThreadGroup("JMS Worker thread group"),
                        "JMSWorker"));

        Iterator iter = connectionFactories.values().iterator();
        while (iter.hasNext()) {
            JMSConnectionFactory conFac = (JMSConnectionFactory) iter.next();
            JMSMessageReceiver msgRcvr =
                    new JMSMessageReceiver(conFac, workerPool, configCtx);


-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-3685) org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver

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

Davanum Srinivas resolved AXIS2-3685.
-------------------------------------

    Resolution: Fixed

fixed in svn revision 643676.

> org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3685
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3685
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.3
>            Reporter: Raymond Feng
>         Attachments: AXIS2-3685.patch
>
>
> In JMSListener.start(), there is a thread pool created for the JMSMessageReceiver. But the thread pool is not shutdown in the stop() method. As a result, the java process cannot be terminated gracefully unless System.exit() is called.
>    public void start() throws AxisFault {
>         // create thread pool of workers
>         ExecutorService workerPool = new ThreadPoolExecutor(
>                 1,
>                 WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
>                 new LinkedBlockingQueue(),
>                 new org.apache.axis2.util.threadpool.DefaultThreadFactory(
>                         new ThreadGroup("JMS Worker thread group"),
>                         "JMSWorker"));
>         Iterator iter = connectionFactories.values().iterator();
>         while (iter.hasNext()) {
>             JMSConnectionFactory conFac = (JMSConnectionFactory) iter.next();
>             JMSMessageReceiver msgRcvr =
>                     new JMSMessageReceiver(conFac, workerPool, configCtx);

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3685) org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver

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

Raymond Feng updated AXIS2-3685:
--------------------------------

    Attachment: AXIS2-3685.patch

Here is a patch to fix the problem. Please review and apply. It would be nice if we can make it into 1.4 release.

> org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3685
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3685
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.3
>            Reporter: Raymond Feng
>         Attachments: AXIS2-3685.patch
>
>
> In JMSListener.start(), there is a thread pool created for the JMSMessageReceiver. But the thread pool is not shutdown in the stop() method. As a result, the java process cannot be terminated gracefully unless System.exit() is called.
>    public void start() throws AxisFault {
>         // create thread pool of workers
>         ExecutorService workerPool = new ThreadPoolExecutor(
>                 1,
>                 WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
>                 new LinkedBlockingQueue(),
>                 new org.apache.axis2.util.threadpool.DefaultThreadFactory(
>                         new ThreadGroup("JMS Worker thread group"),
>                         "JMSWorker"));
>         Iterator iter = connectionFactories.values().iterator();
>         while (iter.hasNext()) {
>             JMSConnectionFactory conFac = (JMSConnectionFactory) iter.next();
>             JMSMessageReceiver msgRcvr =
>                     new JMSMessageReceiver(conFac, workerPool, configCtx);

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org