You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by tt...@apache.org on 2008/09/10 13:46:19 UTC

svn commit: r693800 - /servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java

Author: tterm
Date: Wed Sep 10 04:46:18 2008
New Revision: 693800

URL: http://svn.apache.org/viewvc?rev=693800&view=rev
Log:
SM-1583 polling timeout is to low in AbstractBaseLifeCycle which results in busy waiting

Modified:
    servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java

Modified: servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java?rev=693800&r1=693799&r2=693800&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java Wed Sep 10 04:46:18 2008
@@ -300,14 +300,16 @@
     }
 
     protected void doStart() throws Exception {
-        synchronized (this.polling) {
-            executor.execute(new Runnable() {
-                public void run() {
-                    poller = Thread.currentThread();
-                    pollDeliveryChannel();
-                }
-            });
-            polling.wait();
+        if (container.getType() != Container.Type.ServiceMix3) {
+            synchronized (this.polling) {
+                executor.execute(new Runnable() {
+                    public void run() {
+                        poller = Thread.currentThread();
+                        pollDeliveryChannel();
+                    }
+                });
+                polling.wait();
+            }
         }
     }