activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1141331 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
Date Wed, 29 Jun 2011 23:41:30 GMT
Author: tabish
Date: Wed Jun 29 23:41:30 2011
New Revision: 1141331

URL: http://svn.apache.org/viewvc?rev=1141331&view=rev
Log:
Patch for: https://issues.apache.org/jira/browse/AMQ-3214

Should have any effect either way given the construtor args but user reports that its an issue
in some environments.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?rev=1141331&r1=1141330&r2=1141331&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
Wed Jun 29 23:41:30 2011
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
  * Used to make sure that commands are arriving periodically from the peer of
  * the transport.
  *
- * 
+ *
  */
 public class InactivityMonitor extends TransportFilter {
 
@@ -269,7 +269,7 @@ public class InactivityMonitor extends T
     public void setKeepAliveResponseRequired(boolean val) {
         keepAliveResponseRequired = val;
     }
-    
+
     public void setUseKeepAlive(boolean val) {
         useKeepAlive = val;
     }
@@ -293,7 +293,7 @@ public class InactivityMonitor extends T
     public void setInitialDelayTime(long initialDelayTime) {
         this.initialDelayTime = initialDelayTime;
     }
-    
+
     private synchronized void startMonitorThreads() throws IOException {
         if (monitorStarted.get()) {
             return;
@@ -376,6 +376,8 @@ public class InactivityMonitor extends T
     };
 
     private ThreadPoolExecutor createExecutor() {
-        return new ThreadPoolExecutor(0, Integer.MAX_VALUE, 10, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(),
factory);
+        ThreadPoolExecutor exec = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 10, TimeUnit.SECONDS,
new SynchronousQueue<Runnable>(), factory);
+        exec.allowCoreThreadTimeOut(true);
+        return exec;
     }
 }



Mime
View raw message