servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r1030006 - in /servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi: container/JBIContainer.java messaging/DeliveryChannelImpl.java
Date Tue, 02 Nov 2010 11:42:26 GMT
Author: lhein
Date: Tue Nov  2 11:42:25 2010
New Revision: 1030006

URL: http://svn.apache.org/viewvc?rev=1030006&view=rev
Log:
added flag for the container configuration called "optimizedDelivery" which is set to true
by default. That means the onMessageExchange method of the endpoint is called directly instead
of using the polling mechanism via different thread pools. (see SM-2007)

Modified:
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java?rev=1030006&r1=1030005&r2=1030006&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
(original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
Tue Nov  2 11:42:25 2010
@@ -129,6 +129,7 @@ public class JBIContainer extends BaseLi
     private AtomicBoolean containerInitialized = new AtomicBoolean(false);
     private IdGenerator idGenerator = new IdGenerator();
     private long forceShutdown;
+    private boolean optimizedDelivery = true;
 
     /**
      * Default Constructor
@@ -1462,4 +1463,12 @@ public class JBIContainer extends BaseLi
             }
         }
     }
+
+    public boolean isOptimizedDelivery() {
+        return optimizedDelivery;
+    }
+
+    public void setOptimizedDelivery(boolean optimizedDelivery) {
+        this.optimizedDelivery = optimizedDelivery;
+    }
 }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java?rev=1030006&r1=1030005&r2=1030006&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
(original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/messaging/DeliveryChannelImpl.java
Tue Nov  2 11:42:25 2010
@@ -24,7 +24,6 @@ import java.util.concurrent.BlockingQueu
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
-
 import javax.jbi.JBIException;
 import javax.jbi.component.Component;
 import javax.jbi.component.ComponentLifeCycle;
@@ -607,7 +606,7 @@ public class DeliveryChannelImpl impleme
         // the delivery can be made synchronously, so we don't need
         // to bother with transactions
         MessageExchangeListener listener = getExchangeListener();
-        if (listener != null) {
+        if (listener != null && this.container.isOptimizedDelivery()) {
             me.handleAccept();
             if (LOG.isTraceEnabled()) {
                 LOG.trace("Received: " + me);



Mime
View raw message