You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2008/04/02 03:29:28 UTC
svn commit: r643676 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java
Author: dims
Date: Tue Apr 1 18:29:26 2008
New Revision: 643676
URL: http://svn.apache.org/viewvc?rev=643676&view=rev
Log:
Fix for AXIS2-3685 - org.apache.axis2.transport.jms.JMSListener.stop() doesn't shutdown the thread pool created in start() for JMSMessageReceiver
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java?rev=643676&r1=643675&r2=643676&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/jms/JMSListener.java Tue Apr 1 18:29:26 2008
@@ -102,6 +102,8 @@
* The Axis2 Configuration context
*/
private ConfigurationContext configCtx = null;
+
+ private ExecutorService workerPool;
/**
* This is the TransportListener initialization method invoked by Axis2
@@ -299,7 +301,7 @@
*/
public void start() throws AxisFault {
// create thread pool of workers
- ExecutorService workerPool = new ThreadPoolExecutor(
+ workerPool = new ThreadPoolExecutor(
1,
WORKERS_MAX_THREADS, WORKER_KEEP_ALIVE, TIME_UNIT,
new LinkedBlockingQueue(),
@@ -329,6 +331,9 @@
Iterator iter = connectionFactories.values().iterator();
while (iter.hasNext()) {
((JMSConnectionFactory) iter.next()).stop();
+ }
+ if (workerPool != null) {
+ workerPool.shutdown();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org