servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r488681 - in /incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src: main/java/org/apache/servicemix/eip/ main/java/org/apache/servicemix/eip/patterns/ main/java/org/apache/servicemix/eip/support/ test/java/org/apache/ser...
Date Tue, 19 Dec 2006 14:05:54 GMT
Author: gnodet
Date: Tue Dec 19 06:05:53 2006
New Revision: 488681

URL: http://svn.apache.org/viewvc?view=rev&rev=488681
Log:
EIP endpoints should extend the ProviderEndpoint from servicemix-common

Modified:
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/ContentEnricher.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/MessageFilter.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/Pipeline.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRecipientList.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/WireTap.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractContentBasedRouter.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractSplitter.java
    incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
Tue Dec 19 06:05:53 2006
@@ -19,13 +19,8 @@
 import java.net.URL;
 
 import javax.jbi.JBIException;
-import javax.jbi.component.ComponentContext;
-import javax.jbi.management.DeploymentException;
-import javax.jbi.messaging.DeliveryChannel;
 import javax.jbi.messaging.ExchangeStatus;
 import javax.jbi.messaging.MessageExchange;
-import javax.jbi.messaging.MessageExchangeFactory;
-import javax.jbi.messaging.MessagingException;
 import javax.jbi.messaging.MessageExchange.Role;
 import javax.jbi.servicedesc.ServiceEndpoint;
 import javax.wsdl.Definition;
@@ -34,9 +29,7 @@
 import javax.wsdl.xml.WSDLReader;
 
 import org.apache.servicemix.JbiConstants;
-import org.apache.servicemix.common.BaseLifeCycle;
-import org.apache.servicemix.common.Endpoint;
-import org.apache.servicemix.common.ExchangeProcessor;
+import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.eip.support.ExchangeTarget;
 import org.apache.servicemix.locks.LockManager;
 import org.apache.servicemix.locks.impl.SimpleLockManager;
@@ -54,10 +47,11 @@
  * @author gnodet
  * @version $Revision: 376451 $
  */
-public abstract class EIPEndpoint extends Endpoint implements ExchangeProcessor {
+public abstract class EIPEndpoint extends ProviderEndpoint {
 
-    private ServiceEndpoint activated;
-    private DeliveryChannel channel;
+    /**
+     * The resource pointing to the WSDL for this endpoint
+     */
     private Resource wsdlResource;
     
     /**
@@ -76,10 +70,6 @@
      * The timer manager.
      */
     protected TimerManager timerManager;
-    /**
-     * The exchange factory
-     */
-    protected MessageExchangeFactory exchangeFactory;
     
     /**
      * The ExchangeTarget to use to get the WSDL
@@ -87,18 +77,6 @@
     protected ExchangeTarget wsdlExchangeTarget;
     
     /**
-     * @return Returns the exchangeFactory.
-     */
-    public MessageExchangeFactory getExchangeFactory() {
-        return exchangeFactory;
-    }
-    /**
-     * @param exchangeFactory The exchangeFactory to set.
-     */
-    public void setExchangeFactory(MessageExchangeFactory exchangeFactory) {
-        this.exchangeFactory = exchangeFactory;
-    }
-    /**
      * @return Returns the store.
      */
     public Store getStore() {
@@ -147,19 +125,8 @@
         this.timerManager = timerManager;
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.servicemix.common.Endpoint#getRole()
-     */
-    public Role getRole() {
-        return Role.PROVIDER;
-    }
-
-    public void activate() throws Exception {
-        logger = this.serviceUnit.getComponent().getLogger();
-        ComponentContext ctx = getContext();
-        channel = ctx.getDeliveryChannel();
-        exchangeFactory = channel.createExchangeFactory();
-        activated = ctx.activateEndpoint(service, endpoint);
+    public void start() throws Exception {
+        super.start();
         if (store == null) {
             if (storeFactory == null) {
                 storeFactory = new MemoryStoreFactory();
@@ -173,61 +140,13 @@
             timerManager = new TimerManagerImpl();
         }
         timerManager.start();
-        start();
     }
-
-    public void deactivate() throws Exception {
+    
+    public void stop() throws Exception {
         if (timerManager != null) {
             timerManager.stop();
         }
-        stop();
-        ServiceEndpoint ep = activated;
-        activated = null;
-        ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
-        ctx.deactivateEndpoint(ep);
-    }
-
-    public ExchangeProcessor getProcessor() {
-        return this;
-    }
-    
-    public void validate() throws DeploymentException {
-    }
-    
-    protected ComponentContext getContext() {
-        return getServiceUnit().getComponent().getComponentContext();
-    }
-    
-    protected void send(MessageExchange me) throws MessagingException {
-        if (me.getRole() == MessageExchange.Role.CONSUMER &&
-            me.getStatus() == ExchangeStatus.ACTIVE) {
-            BaseLifeCycle lf = (BaseLifeCycle) getServiceUnit().getComponent().getLifeCycle();
-            lf.sendConsumerExchange(me, (Endpoint) this);
-        } else {
-            channel.send(me);
-        }
-    }
-    
-    protected void sendSync(MessageExchange me) throws MessagingException {
-        if (!channel.sendSync(me)) {
-            throw new MessagingException("SendSync failed");
-        }
-    }
-    
-    protected void done(MessageExchange me) throws MessagingException {
-        me.setStatus(ExchangeStatus.DONE);
-        send(me);
-    }
-    
-    protected void fail(MessageExchange me, Exception error) throws MessagingException {
-        me.setError(error);
-        send(me);
-    }
-    
-    public void start() throws Exception {
-    }
-    
-    public void stop() {
+        super.stop();
     }
 
     /* (non-Javadoc)

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/ContentEnricher.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/ContentEnricher.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/ContentEnricher.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/ContentEnricher.java
Tue Dec 19 06:05:53 2006
@@ -154,7 +154,7 @@
             return;
         }
         	        
-    	InOut enricherTargetME = exchangeFactory.createInOutExchange();
+    	InOut enricherTargetME = getExchangeFactory().createInOutExchange();
         enricherTarget.configureTarget(enricherTargetME, getContext());
         MessageUtil.transferInToIn(exchange, enricherTargetME);
                 

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/MessageFilter.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/MessageFilter.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/MessageFilter.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/MessageFilter.java
Tue Dec 19 06:05:53 2006
@@ -133,7 +133,7 @@
             fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly
MEP"));
         } else {
             NormalizedMessage in = MessageUtil.copyIn(exchange);
-            MessageExchange me = exchangeFactory.createExchange(exchange.getPattern());
+            MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
             target.configureTarget(me, getContext());
             MessageUtil.transferToIn(in, me);
             if (filter.matches(me)) {
@@ -179,7 +179,7 @@
                 done(exchange);
             } else {
                 NormalizedMessage in = MessageUtil.copyIn(exchange);
-                MessageExchange me = exchangeFactory.createExchange(exchange.getPattern());
+                MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
                 target.configureTarget(me, getContext());
                 MessageUtil.transferToIn(in, me);
                 if (filter.matches(me)) {

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/Pipeline.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/Pipeline.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/Pipeline.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/Pipeline.java
Tue Dec 19 06:05:53 2006
@@ -175,7 +175,7 @@
             return;
         }
         // Create exchange for target
-        InOut tme = exchangeFactory.createInOutExchange();
+        InOut tme = getExchangeFactory().createInOutExchange();
         transformer.configureTarget(tme, getContext());
         // Send in to listener and target
         MessageUtil.transferInToIn(exchange, tme);
@@ -191,7 +191,7 @@
         else if (tme.getFault() != null) {
             // Faults must be sent to the target / faultsTarget
             if (faultsTarget != null || sendFaultsToTarget) {
-                MessageExchange me = exchangeFactory.createExchange(exchange.getPattern());
+                MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
                 (faultsTarget != null ? faultsTarget : target).configureTarget(me, getContext());
                 MessageUtil.transferToIn(tme.getFault(), me);
                 sendSync(me);
@@ -236,7 +236,7 @@
             throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+ " but has no correlation set");
         // This is the answer from the transformer
         } else {
-            MessageExchange me = exchangeFactory.createExchange(exchange.getPattern());
+            MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
             target.configureTarget(me, getContext());
             MessageUtil.transferOutToIn(tme, me);
             sendSync(me);
@@ -298,7 +298,7 @@
                     return;
                 }
                 // Create exchange for target
-                MessageExchange tme = exchangeFactory.createInOutExchange();
+                MessageExchange tme = getExchangeFactory().createInOutExchange();
                 transformer.configureTarget(tme, getContext());
                 // Set correlations
                 exchange.setProperty(correlationTransformer, tme.getExchangeId());
@@ -336,7 +336,7 @@
                     if (mep == null) {
                         throw new IllegalStateException("Exchange does not carry the consumer
MEP");
                     }
-                    MessageExchange me = exchangeFactory.createExchange(mep);
+                    MessageExchange me = getExchangeFactory().createExchange(mep);
                     (faultsTarget != null ? faultsTarget : target).configureTarget(me, getContext());
                     me.setProperty(correlationConsumer, consumerId);
                     me.setProperty(correlationTransformer, exchange.getExchangeId());
@@ -365,7 +365,7 @@
                 if (mep == null) {
                     throw new IllegalStateException("Exchange does not carry the consumer
MEP");
                 }
-                MessageExchange me = exchangeFactory.createExchange(mep);
+                MessageExchange me = getExchangeFactory().createExchange(mep);
                 target.configureTarget(me, getContext());
                 me.setProperty(correlationConsumer, consumerId);
                 me.setProperty(correlationTransformer, exchange.getExchangeId());

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRecipientList.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRecipientList.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRecipientList.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRecipientList.java
Tue Dec 19 06:05:53 2006
@@ -112,7 +112,7 @@
         }
         NormalizedMessage in = MessageUtil.copyIn(exchange);
         for (int i = 0; i < recipients.length; i++) {
-            MessageExchange me = exchangeFactory.createExchange(exchange.getPattern());
+            MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
             recipients[i].configureTarget(me, getContext());
             MessageUtil.transferToIn(in, me);
             sendSync(me);
@@ -150,7 +150,7 @@
             } else {
                 NormalizedMessage in = MessageUtil.copyIn(exchange);
                 for (int i = 0; i < recipients.length; i++) {
-                    MessageExchange me = exchangeFactory.createExchange(exchange.getPattern());
+                    MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
                     recipients[i].configureTarget(me, getContext());
                     MessageUtil.transferToIn(in, me);
                     send(me);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/StaticRoutingSlip.java
Tue Dec 19 06:05:53 2006
@@ -99,7 +99,7 @@
         }
         MessageExchange current = exchange;
         for (int i = 0; i < targets.length; i++) {
-            InOut me = exchangeFactory.createInOutExchange();
+            InOut me = getExchangeFactory().createInOutExchange();
             targets[i].configureTarget(me, getContext());
             if (i == 0) {
                 MessageUtil.transferInToIn(current, me);
@@ -156,7 +156,7 @@
             } else if (exchange instanceof InOut == false) {
                 throw new IllegalStateException("Use an InOut MEP");
             } else {
-                MessageExchange me = exchangeFactory.createInOutExchange();
+                MessageExchange me = getExchangeFactory().createInOutExchange();
                 me.setProperty(correlation, exchange.getExchangeId());
                 me.setProperty(index, new Integer(0));
                 targets[0].configureTarget(me, getContext());
@@ -214,7 +214,7 @@
                     }
                 // We still have a target to hit
                 } else {
-                    MessageExchange me = exchangeFactory.createInOutExchange();
+                    MessageExchange me = getExchangeFactory().createInOutExchange();
                     Integer curIndex = new Integer(prevIndex.intValue() + 1);
                     me.setProperty(correlation, correlationId);
                     me.setProperty(index, curIndex);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/WireTap.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/WireTap.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/WireTap.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/WireTap.java
Tue Dec 19 06:05:53 2006
@@ -141,7 +141,7 @@
      */
     protected void processSync(MessageExchange exchange) throws Exception {
         // Create exchange for target
-        MessageExchange tme = exchangeFactory.createExchange(exchange.getPattern());
+        MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
         target.configureTarget(tme, getContext());
         sendSyncToListenerAndTarget(exchange, tme, inListener, "in");
         if (tme.getStatus() == ExchangeStatus.DONE) {
@@ -167,7 +167,7 @@
         if (exchange.getRole() == MessageExchange.Role.PROVIDER &&
             exchange.getProperty(correlation) == null) {
             // Create exchange for target
-            MessageExchange tme = exchangeFactory.createExchange(exchange.getPattern());
+            MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
             if (store.hasFeature(Store.CLUSTERED)) {
                 exchange.setProperty(JbiConstants.STATELESS_PROVIDER, Boolean.TRUE);
                 tme.setProperty(JbiConstants.STATELESS_CONSUMER, Boolean.TRUE);
@@ -221,7 +221,7 @@
                                          String message) throws Exception {
         if (listener != null) {
             NormalizedMessage msg = MessageUtil.copy(source.getMessage(message));
-            InOnly lme = exchangeFactory.createInOnlyExchange();
+            InOnly lme = getExchangeFactory().createInOnlyExchange();
             if (store.hasFeature(Store.CLUSTERED)) {
                 lme.setProperty(JbiConstants.STATELESS_CONSUMER, Boolean.TRUE);
             }
@@ -242,7 +242,7 @@
                                              String message) throws Exception {
         if (listener != null) {
             NormalizedMessage msg = MessageUtil.copy(source.getMessage(message));
-            InOnly lme = exchangeFactory.createInOnlyExchange();
+            InOnly lme = getExchangeFactory().createInOnlyExchange();
             if (store.hasFeature(Store.CLUSTERED)) {
                 lme.setProperty(JbiConstants.STATELESS_CONSUMER, Boolean.TRUE);
             }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractAggregator.java
Tue Dec 19 06:05:53 2006
@@ -186,7 +186,7 @@
     protected void sendAggregate(String correlationId,
                                  Object aggregation,
                                  boolean timeout) throws Exception {
-        InOnly me = exchangeFactory.createInOnlyExchange();
+        InOnly me = getExchangeFactory().createInOnlyExchange();
         target.configureTarget(me, getContext());
         NormalizedMessage nm = me.createMessage();
         me.setInMessage(nm);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractContentBasedRouter.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractContentBasedRouter.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractContentBasedRouter.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractContentBasedRouter.java
Tue Dec 19 06:05:53 2006
@@ -57,7 +57,7 @@
      */
     protected void processSync(MessageExchange exchange) throws Exception {
         // Create exchange for target
-        MessageExchange tme = exchangeFactory.createExchange(exchange.getPattern());
+        MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
         // Now copy input to new exchange
         // We need to read the message once for finding routing target
         // so ensure we have a re-readable source
@@ -96,7 +96,7 @@
         if (exchange.getRole() == MessageExchange.Role.PROVIDER &&
             exchange.getProperty(correlation) == null) {
             // Create exchange for target
-            MessageExchange tme = exchangeFactory.createExchange(exchange.getPattern());
+            MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
             if (store.hasFeature(Store.CLUSTERED)) {
                 exchange.setProperty(JbiConstants.STATELESS_PROVIDER, Boolean.TRUE);
                 tme.setProperty(JbiConstants.STATELESS_CONSUMER, Boolean.TRUE);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractSplitter.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractSplitter.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractSplitter.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/AbstractSplitter.java
Tue Dec 19 06:05:53 2006
@@ -156,10 +156,17 @@
         if (target == null) {
             throw new IllegalArgumentException("target should be set to a valid ExchangeTarget");
         }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.servicemix.eip.EIPEndpoint#start()
+     */
+    public void start() throws Exception {
+        super.start();
         // Create correlation property
         correlation = "Splitter.Correlation." + getContext().getComponentName();
     }
-    
+
     /* (non-Javadoc)
      * @see org.apache.servicemix.eip.EIPEndpoint#processSync(javax.jbi.messaging.MessageExchange)
      */
@@ -251,7 +258,7 @@
     protected MessageExchange createPart(URI pattern,
                                          NormalizedMessage srcMessage, 
                                          Source content) throws Exception {
-        MessageExchange me = exchangeFactory.createExchange(pattern);
+        MessageExchange me = getExchangeFactory().createExchange(pattern);
         NormalizedMessage in = me.createMessage();
         in.setContent(content);
         me.setMessage(in, "in");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java?view=diff&rev=488681&r1=488680&r2=488681
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java
(original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/VMEIPTests.java
Tue Dec 19 06:05:53 2006
@@ -32,6 +32,7 @@
         suite.addTestSuite(StaticRecipientListTest.class);
         suite.addTestSuite(MessageFilterTest.class);
         suite.addTestSuite(SplitAggregatorTest.class);
+        suite.addTestSuite(ContentEnricherTest.class);
         //$JUnit-END$
         return suite;
     }



Mime
View raw message