servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r1030641 - in /servicemix/components/shared-libraries/trunk: pom.xml servicemix-common/src/main/java/org/apache/servicemix/common/AsyncBaseLifeCycle.java
Date Wed, 03 Nov 2010 20:12:33 GMT
Author: lhein
Date: Wed Nov  3 20:12:33 2010
New Revision: 1030641

URL: http://svn.apache.org/viewvc?rev=1030641&view=rev
Log:
using now reflection for better decoupling from servicemix-core (see SM-2007)

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

Modified: servicemix/components/shared-libraries/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/pom.xml?rev=1030641&r1=1030640&r2=1030641&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/pom.xml (original)
+++ servicemix/components/shared-libraries/trunk/pom.xml Wed Nov  3 20:12:33 2010
@@ -41,7 +41,7 @@
   </scm>
 
   <properties>
-    <servicemix-version>3.3.3-SNAPSHOT</servicemix-version>
+    <servicemix-version>3.3</servicemix-version>
     <activemq-version>5.4.1</activemq-version>
     <servicemix.osgi.export>${servicemix.osgi.export.pkg}*;version=${project.version}</servicemix.osgi.export>
     <servicemix.osgi.export.pkg />

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=1030641&r1=1030640&r2=1030641&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 Nov  3 20:12:33 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.servicemix.common;
 
+import java.lang.reflect.Method;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -43,7 +44,6 @@ import org.apache.commons.logging.Log;
 import org.apache.servicemix.executors.Executor;
 import org.apache.servicemix.executors.ExecutorFactory;
 import org.apache.servicemix.executors.impl.ExecutorFactoryImpl;
-import org.apache.servicemix.jbi.container.JBIContainer;
 
 /**
  * Base class for life cycle management of components. This class may be used as
@@ -324,8 +324,11 @@ public class AsyncBaseLifeCycle implemen
             doPoll = true;
         } else {
             Object smx3container = ((Container.Smx3Container)container).getSmx3Container();
-            if (smx3container instanceof JBIContainer) {
-                doPoll = ((JBIContainer)smx3container).isOptimizedDelivery() == false;
+            try {
+                Method m = smx3container.getClass().getMethod("isOptimizedDelivery");
+                doPoll = false == (Boolean)m.invoke(smx3container, null);    
+            } catch (NoSuchMethodException nsmex) {
+                doPoll = false;
             }
         }
 



Mime
View raw message