You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/11/24 10:46:45 UTC
svn commit: r478818 -
/incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/drools/DroolsComponent.java
Author: gnodet
Date: Fri Nov 24 01:46:45 2006
New Revision: 478818
URL: http://svn.apache.org/viewvc?view=rev&rev=478818
Log:
SM-751: Flow tracing with correlation id.
Patch provided by Gianfranco Boccalon
Modified:
incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/drools/DroolsComponent.java
Modified: incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/drools/DroolsComponent.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/drools/DroolsComponent.java?view=diff&rev=478818&r1=478817&r2=478818
==============================================================================
--- incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/drools/DroolsComponent.java (original)
+++ incubator/servicemix/trunk/common/servicemix-components/src/main/java/org/apache/servicemix/components/drools/DroolsComponent.java Fri Nov 24 01:46:45 2006
@@ -30,6 +30,7 @@
import javax.jbi.messaging.NormalizedMessage;
import javax.xml.namespace.QName;
+import org.apache.servicemix.JbiConstants;
import org.apache.servicemix.components.util.OutBinding;
import org.drools.FactException;
import org.drools.RuleBase;
@@ -80,6 +81,10 @@
DeliveryChannel channel = getDeliveryChannel();
MessageExchangeFactory factory = channel.createExchangeFactoryForService(name);
InOnly outExchange = factory.createInOnlyExchange();
+ String processCorrelationId = (String)exchange.getProperty(JbiConstants.CORRELATION_ID);
+ if (processCorrelationId != null) {
+ outExchange.setProperty(JbiConstants.CORRELATION_ID, processCorrelationId);
+ }
forwardToExchange(exchange, outExchange, in);
}
@@ -88,6 +93,10 @@
DeliveryChannel channel = getDeliveryChannel();
MessageExchangeFactory factory = channel.createExchangeFactory(name);
InOnly outExchange = factory.createInOnlyExchange();
+ String processCorrelationId = (String)exchange.getProperty(JbiConstants.CORRELATION_ID);
+ if (processCorrelationId != null) {
+ outExchange.setProperty(JbiConstants.CORRELATION_ID, processCorrelationId);
+ }
forwardToExchange(exchange, outExchange, in);
}