activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r384193 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportServerThreadSupport.java
Date Wed, 08 Mar 2006 12:09:52 GMT
Author: jstrachan
Date: Wed Mar  8 04:09:49 2006
New Revision: 384193

URL: http://svn.apache.org/viewcvs?rev=384193&view=rev
Log:
minor refactor to make it easier to override starting

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=384193&r1=384192&r2=384193&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
Wed Mar  8 04:09:49 2006
@@ -50,11 +50,7 @@
 
     public void start() throws Exception {
         if (started.compareAndSet(false, true)) {
-            log.info("Listening for connections at: " + getLocation());
-            runner = new Thread(this, toString());
-            runner.setDaemon(daemon);
-            runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
-            runner.start();
+            doStart();
         }
     }
 
@@ -115,6 +111,14 @@
      */
     public void setJoinOnStop(boolean joinOnStop) {
         this.joinOnStop = joinOnStop;
+    }
+
+    protected void doStart() {
+        log.info("Listening for connections at: " + getLocation());
+        runner = new Thread(this, toString());
+        runner.setDaemon(daemon);
+        runner.setPriority(ThreadPriorities.BROKER_MANAGEMENT);
+        runner.start();
     }
 
     protected abstract void doStop(ServiceStopper stopper) throws Exception;



Mime
View raw message