activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r382821 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Date Fri, 03 Mar 2006 13:58:07 GMT
Author: jstrachan
Date: Fri Mar  3 05:58:06 2006
New Revision: 382821

URL: http://svn.apache.org/viewcvs?rev=382821&view=rev
Log:
minor refactor to make it easier to add extra startup features

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

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java?rev=382821&r1=382820&r2=382821&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Fri Mar  3 05:58:06 2006
@@ -18,6 +18,8 @@
 
 import org.apache.activemq.util.ServiceStopper;
 
+import java.io.IOException;
+
 import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean;
 
 /**
@@ -35,9 +37,7 @@
 
     public void start() throws Exception {
         if (started.compareAndSet(false, true)) {
-            runner = new Thread(this, toString());
-            runner.setDaemon(daemon);
-            runner.start();
+            doStart();
         }
     }
 
@@ -70,6 +70,13 @@
 
     public void setDaemon(boolean daemon) {
         this.daemon = daemon;
+    }
+
+
+    protected void doStart() throws Exception {
+        runner = new Thread(this, toString());
+        runner.setDaemon(daemon);
+        runner.start();
     }
 
     protected abstract void doStop(ServiceStopper stopper) throws Exception;



Mime
View raw message