activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r380683 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
Date Fri, 24 Feb 2006 15:08:42 GMT
Author: jstrachan
Date: Fri Feb 24 07:08:40 2006
New Revision: 380683

URL: http://svn.apache.org/viewcvs?rev=380683&view=rev
Log:
made the join ability of the transport configurable so that we don't have to wait for each
transport to complete

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

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java?rev=380683&r1=380682&r2=380683&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
Fri Feb 24 07:08:40 2006
@@ -38,6 +38,7 @@
     private AtomicBoolean started = new AtomicBoolean(false);
     private AtomicBoolean closing = new AtomicBoolean(false);
     private boolean daemon = true;
+    private boolean joinOnStop = true;
     private Thread runner;
 
     public TransportServerThreadSupport() {
@@ -67,7 +68,7 @@
             catch (Exception e) {
                 stopper.onException(this, e);
             }
-            if (runner != null) {
+            if (runner != null && joinOnStop) {
                 runner.join();
                 runner = null;
             }
@@ -97,8 +98,23 @@
         return daemon;
     }
 
+    /**
+     * Sets whether the background read thread is a daemon thread or not
+     */
     public void setDaemon(boolean daemon) {
         this.daemon = daemon;
+    }
+
+    
+    public boolean isJoinOnStop() {
+        return joinOnStop;
+    }
+
+    /**
+     * Sets whether the background read thread is joined with (waited for) on a stop
+     */
+    public void setJoinOnStop(boolean joinOnStop) {
+        this.joinOnStop = joinOnStop;
     }
 
     protected abstract void doStop(ServiceStopper stopper) throws Exception;



Mime
View raw message