servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r526407 [3/4] - in /incubator/servicemix/trunk/deployables/serviceengines: servicemix-bean/src/main/java/org/apache/servicemix/bean/ servicemix-bean/src/main/java/org/apache/servicemix/bean/support/ servicemix-bean/src/test/java/org/apache/...
Date Sat, 07 Apr 2007 08:35:53 GMT
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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -73,7 +73,7 @@
      * faults may be sent to the target endpoint
      * if this flag is set to <code>true</code>
      */
-    private boolean sendFaultsToTarget = false;
+    private boolean sendFaultsToTarget;
 
     /**
      * The correlation property used by this component
@@ -169,8 +169,8 @@
      * @see org.apache.servicemix.eip.EIPEndpoint#processSync(javax.jbi.messaging.MessageExchange)
      */
     protected void processSync(MessageExchange exchange) throws Exception {
-        if (exchange instanceof InOnly == false &&
-            exchange instanceof RobustInOnly == false) {
+        if (!(exchange instanceof InOnly)
+            && !(exchange instanceof RobustInOnly)) {
             fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
             return;
         }
@@ -183,62 +183,52 @@
         // Check result
         if (tme.getStatus() == ExchangeStatus.DONE) {
             throw new IllegalStateException("Received a DONE status from the transformer");
-        }
         // Errors must be sent back to the consumer
-        else if (tme.getStatus() == ExchangeStatus.ERROR) {
+        } else if (tme.getStatus() == ExchangeStatus.ERROR) {
             fail(exchange, tme.getError());
-        }
-        else if (tme.getFault() != null) {
-            // Faults must be sent to the target / faultsTarget
-            if (faultsTarget != null || sendFaultsToTarget) {
-                MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
-                (faultsTarget != null ? faultsTarget : target).configureTarget(me, getContext());
-                MessageUtil.transferToIn(tme.getFault(), me);
-                sendSync(me);
-                done(tme);
-                if (me.getStatus() == ExchangeStatus.DONE) {
-                    done(exchange);
-                } else if (me.getStatus() == ExchangeStatus.ERROR) {
-                    fail(exchange, me.getError());
-                } else if (me.getFault() != null) {
-                    if (exchange instanceof InOnly) {
-                        // Do not use the fault has it may contain streams
-                        // So just transform it to a string and send an error
-                        String fault = new SourceTransformer().contentToString(me.getFault());
-                        done(me);
-                        fail(exchange, new FaultException(fault, null, null));
-                    } else {
-                        Fault fault = MessageUtil.copyFault(me);
-                        MessageUtil.transferToFault(fault, exchange);
-                        done(me);
-                        sendSync(exchange);
-                    }
-                } else {
-                    throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no correlation set");
-                }
-            // Faults must be sent back to the consumer
-            } else {
+        } else if (tme.getFault() != null) {
+            processFault(exchange, tme);
+        // This should not happen
+        } else if (tme.getOutMessage() == null) {
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                    + " but has no correlation set");
+        // This is the answer from the transformer
+        } else {
+            MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
+            target.configureTarget(me, getContext());
+            MessageUtil.transferOutToIn(tme, me);
+            sendSync(me);
+            done(tme);
+            if (me.getStatus() == ExchangeStatus.DONE) {
+                done(exchange);
+            } else if (me.getStatus() == ExchangeStatus.ERROR) {
+                fail(exchange, me.getError());
+            } else if (me.getFault() != null) {
                 if (exchange instanceof InOnly) {
                     // Do not use the fault has it may contain streams
                     // So just transform it to a string and send an error
-                    String fault = new SourceTransformer().contentToString(tme.getFault());
-                    done(tme);
+                    String fault = new SourceTransformer().contentToString(me.getFault());
+                    done(me);
                     fail(exchange, new FaultException(fault, null, null));
                 } else {
-                    Fault fault = MessageUtil.copyFault(tme);
+                    Fault fault = MessageUtil.copyFault(me);
                     MessageUtil.transferToFault(fault, exchange);
-                    done(tme);
+                    done(me);
                     sendSync(exchange);
                 }
+            } else {
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                        + " but has no correlation set");
             }
-        // This should not happen
-        } else if (tme.getOutMessage() == null) {
-            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no correlation set");
-        // This is the answer from the transformer
-        } else {
+        }
+    }
+
+    private void processFault(MessageExchange exchange, InOut tme) throws Exception {
+        // Faults must be sent to the target / faultsTarget
+        if (faultsTarget != null || sendFaultsToTarget) {
             MessageExchange me = getExchangeFactory().createExchange(exchange.getPattern());
-            target.configureTarget(me, getContext());
-            MessageUtil.transferOutToIn(tme, me);
+            (faultsTarget != null ? faultsTarget : target).configureTarget(me, getContext());
+            MessageUtil.transferToIn(tme.getFault(), me);
             sendSync(me);
             done(tme);
             if (me.getStatus() == ExchangeStatus.DONE) {
@@ -259,7 +249,22 @@
                     sendSync(exchange);
                 }
             } else {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no correlation set");
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                        + " but has no correlation set");
+            }
+        // Faults must be sent back to the consumer
+        } else {
+            if (exchange instanceof InOnly) {
+                // Do not use the fault has it may contain streams
+                // So just transform it to a string and send an error
+                String fault = new SourceTransformer().contentToString(tme.getFault());
+                done(tme);
+                fail(exchange, new FaultException(fault, null, null));
+            } else {
+                Fault fault = MessageUtil.copyFault(tme);
+                MessageUtil.transferToFault(fault, exchange);
+                done(tme);
+                sendSync(exchange);
             }
         }
     }
@@ -270,161 +275,178 @@
     protected void processAsync(MessageExchange exchange) throws Exception {
         // The exchange comes from the consumer
         if (exchange.getRole() == MessageExchange.Role.PROVIDER) {
-            // A DONE status from the consumer can only be received
-            // when a fault has been sent
-            if (exchange.getStatus() == ExchangeStatus.DONE) {
-                String transformerId = (String) exchange.getProperty(correlationTransformer);
-                String targetId = (String) exchange.getProperty(correlationTarget);
-                if (transformerId == null && targetId == null) {
-                    throw new IllegalStateException("Exchange status is " + ExchangeStatus.DONE + " but has no correlation set");
-                }
-                // Load the exchange
-                MessageExchange me = (MessageExchange) store.load(targetId != null ? targetId : transformerId);
-                done(me);
-            // Errors must be sent back to the target or transformer
-            } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
-                String transformerId = (String) exchange.getProperty(correlationTransformer);
-                String targetId = (String) exchange.getProperty(correlationTarget);
-                if (transformerId == null && targetId == null) {
-                    throw new IllegalStateException("Exchange status is " + ExchangeStatus.DONE + " but has no correlation set");
-                }
-                // Load the exchange
-                MessageExchange me = (MessageExchange) store.load(targetId != null ? targetId : transformerId);
-                fail(me, exchange.getError());
-            // This is a new exchange
-            } else if (exchange.getProperty(correlationTransformer) == null) {
-                if (exchange instanceof InOnly == false && exchange instanceof RobustInOnly == false) {
-                    fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
-                    return;
-                }
-                // Create exchange for target
-                MessageExchange tme = getExchangeFactory().createInOutExchange();
-                transformer.configureTarget(tme, getContext());
-                // Set correlations
-                exchange.setProperty(correlationTransformer, tme.getExchangeId());
-                tme.setProperty(correlationConsumer, exchange.getExchangeId());
-                tme.setProperty(TRANSFORMER, Boolean.TRUE);
-                tme.setProperty(CONSUMER_MEP, exchange.getPattern());
-                // Put exchange to store
-                store.store(exchange.getExchangeId(), exchange);
-                // Send in to listener and target
-                MessageUtil.transferInToIn(exchange, tme);
-                send(tme);
-            } else {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no correlation set");
-            }
+            processAsyncProvider(exchange);
         // If the exchange comes from the transformer
         } else if (Boolean.TRUE.equals(exchange.getProperty(TRANSFORMER))) {
-            // Retrieve the correlation id
-            String consumerId = (String) exchange.getProperty(correlationConsumer);
-            if (consumerId == null) {
-                throw new IllegalStateException(correlationConsumer + " property not found");
+            processAsyncTransformerResponse(exchange);
+        // The exchange comes from the target
+        } else {
+            processAsyncTargetResponse(exchange);
+        }
+    }
+    
+    private void processAsyncProvider(MessageExchange exchange) throws Exception {
+        // A DONE status from the consumer can only be received
+        // when a fault has been sent
+        if (exchange.getStatus() == ExchangeStatus.DONE) {
+            String transformerId = (String) exchange.getProperty(correlationTransformer);
+            String targetId = (String) exchange.getProperty(correlationTarget);
+            if (transformerId == null && targetId == null) {
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.DONE
+                        + " but has no correlation set");
             }
-            // This should not happen beacause the MEP is an In-Out
-            // and the DONE status is always sent by the consumer (us)
-            if (exchange.getStatus() == ExchangeStatus.DONE) {
-                throw new IllegalStateException("Received a DONE status from the transformer");
-            // Errors must be sent back to the consumer
-            } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
-                MessageExchange me = (MessageExchange) store.load(consumerId);
-                fail(me, exchange.getError());
-            } else if (exchange.getFault() != null) {
-                // Faults must be sent to faultsTarget / target
-                if (faultsTarget != null || sendFaultsToTarget) {
-                    // Retrieve the consumer MEP
-                    URI mep = (URI) exchange.getProperty(CONSUMER_MEP);
-                    if (mep == null) {
-                        throw new IllegalStateException("Exchange does not carry the consumer MEP");
-                    }
-                    MessageExchange me = getExchangeFactory().createExchange(mep);
-                    (faultsTarget != null ? faultsTarget : target).configureTarget(me, getContext());
-                    me.setProperty(correlationConsumer, consumerId);
-                    me.setProperty(correlationTransformer, exchange.getExchangeId());
-                    store.store(exchange.getExchangeId(), exchange);
-                    MessageUtil.transferToIn(exchange.getFault(), me);
-                    send(me);
-                // Faults must be sent back to the consumer
-                } else {
-                    MessageExchange me = (MessageExchange) store.load(consumerId);
-                    if (me instanceof InOnly) {
-                        // Do not use the fault has it may contain streams
-                        // So just transform it to a string and send an error
-                        String fault = new SourceTransformer().contentToString(exchange.getFault());
-                        fail(me, new FaultException(fault, null, null));
-                        done(exchange);
-                    } else {
-                        store.store(exchange.getExchangeId(), exchange);
-                        MessageUtil.transferFaultToFault(exchange, me);
-                        send(me);
-                    }
-                }
-            // This is the answer from the transformer
-            } else if (exchange.getMessage("out") != null) {
+            // Load the exchange
+            MessageExchange me = (MessageExchange) store.load(targetId != null ? targetId : transformerId);
+            done(me);
+        // Errors must be sent back to the target or transformer
+        } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            String transformerId = (String) exchange.getProperty(correlationTransformer);
+            String targetId = (String) exchange.getProperty(correlationTarget);
+            if (transformerId == null && targetId == null) {
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.DONE
+                        + " but has no correlation set");
+            }
+            // Load the exchange
+            MessageExchange me = (MessageExchange) store.load(targetId != null ? targetId : transformerId);
+            fail(me, exchange.getError());
+        // This is a new exchange
+        } else if (exchange.getProperty(correlationTransformer) == null) {
+            if (!(exchange instanceof InOnly) && !(exchange instanceof RobustInOnly)) {
+                fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
+                return;
+            }
+            // Create exchange for target
+            MessageExchange tme = getExchangeFactory().createInOutExchange();
+            transformer.configureTarget(tme, getContext());
+            // Set correlations
+            exchange.setProperty(correlationTransformer, tme.getExchangeId());
+            tme.setProperty(correlationConsumer, exchange.getExchangeId());
+            tme.setProperty(TRANSFORMER, Boolean.TRUE);
+            tme.setProperty(CONSUMER_MEP, exchange.getPattern());
+            // Put exchange to store
+            store.store(exchange.getExchangeId(), exchange);
+            // Send in to listener and target
+            MessageUtil.transferInToIn(exchange, tme);
+            send(tme);
+        } else {
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                    + " but has no correlation set");
+        }
+    }
+
+    private void processAsyncTransformerResponse(MessageExchange exchange) throws Exception {
+        // Retrieve the correlation id
+        String consumerId = (String) exchange.getProperty(correlationConsumer);
+        if (consumerId == null) {
+            throw new IllegalStateException(correlationConsumer + " property not found");
+        }
+        // This should not happen beacause the MEP is an In-Out
+        // and the DONE status is always sent by the consumer (us)
+        if (exchange.getStatus() == ExchangeStatus.DONE) {
+            throw new IllegalStateException("Received a DONE status from the transformer");
+        // Errors must be sent back to the consumer
+        } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            MessageExchange me = (MessageExchange) store.load(consumerId);
+            fail(me, exchange.getError());
+        } else if (exchange.getFault() != null) {
+            // Faults must be sent to faultsTarget / target
+            if (faultsTarget != null || sendFaultsToTarget) {
                 // Retrieve the consumer MEP
                 URI mep = (URI) exchange.getProperty(CONSUMER_MEP);
                 if (mep == null) {
                     throw new IllegalStateException("Exchange does not carry the consumer MEP");
                 }
                 MessageExchange me = getExchangeFactory().createExchange(mep);
-                target.configureTarget(me, getContext());
+                (faultsTarget != null ? faultsTarget : target).configureTarget(me, getContext());
                 me.setProperty(correlationConsumer, consumerId);
                 me.setProperty(correlationTransformer, exchange.getExchangeId());
                 store.store(exchange.getExchangeId(), exchange);
-                MessageUtil.transferOutToIn(exchange, me);
+                MessageUtil.transferToIn(exchange.getFault(), me);
                 send(me);
-            // This should not happen
+            // Faults must be sent back to the consumer
             } else {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
-            }
-        // The exchange comes from the target
-        } else {
-            // Retrieve the correlation id for the consumer
-            String consumerId = (String) exchange.getProperty(correlationConsumer);
-            if (consumerId == null) {
-                throw new IllegalStateException(correlationConsumer + " property not found");
-            }
-            // Retrieve the correlation id for the transformer
-            String transformerId = (String) exchange.getProperty(correlationTransformer);
-            if (transformerId == null) {
-                throw new IllegalStateException(correlationTransformer + " property not found");
+                MessageExchange me = (MessageExchange) store.load(consumerId);
+                if (me instanceof InOnly) {
+                    // Do not use the fault has it may contain streams
+                    // So just transform it to a string and send an error
+                    String fault = new SourceTransformer().contentToString(exchange.getFault());
+                    fail(me, new FaultException(fault, null, null));
+                    done(exchange);
+                } else {
+                    store.store(exchange.getExchangeId(), exchange);
+                    MessageUtil.transferFaultToFault(exchange, me);
+                    send(me);
+                }
             }
-            // This should be the last message received
-            if (exchange.getStatus() == ExchangeStatus.DONE) {
-                // Need to ack the transformer
-                MessageExchange tme = (MessageExchange) store.load(transformerId);
-                done(tme);
-                // Need to ack the consumer
-                MessageExchange cme = (MessageExchange) store.load(consumerId);
-                done(cme);
-            // Errors should be sent back to the consumer
-            } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
-                // Need to ack the transformer
-                MessageExchange tme = (MessageExchange) store.load(transformerId);
-                done(tme);
-                // Send error to consumer
-                MessageExchange cme = (MessageExchange) store.load(consumerId);
-                fail(cme, exchange.getError());
-            // If we have a robust-in-only MEP, we can receive a fault
-            } else if (exchange.getFault() != null) {
-                // Need to ack the transformer
-                MessageExchange tme = (MessageExchange) store.load(transformerId);
-                done(tme);
-                // Send fault back to consumer
-                store.store(exchange.getExchangeId(), exchange);
-                MessageExchange cme = (MessageExchange) store.load(consumerId);
-                cme.setProperty(correlationTarget, exchange.getExchangeId());
-                MessageUtil.transferFaultToFault(exchange, cme);
-                send(cme);
-            // This should not happen
-            } else {
-                throw new IllegalStateException("Exchange from target has a " + ExchangeStatus.ACTIVE + " status but has no Fault message");
+        // This is the answer from the transformer
+        } else if (exchange.getMessage("out") != null) {
+            // Retrieve the consumer MEP
+            URI mep = (URI) exchange.getProperty(CONSUMER_MEP);
+            if (mep == null) {
+                throw new IllegalStateException("Exchange does not carry the consumer MEP");
             }
+            MessageExchange me = getExchangeFactory().createExchange(mep);
+            target.configureTarget(me, getContext());
+            me.setProperty(correlationConsumer, consumerId);
+            me.setProperty(correlationTransformer, exchange.getExchangeId());
+            store.store(exchange.getExchangeId(), exchange);
+            MessageUtil.transferOutToIn(exchange, me);
+            send(me);
+        // This should not happen
+        } else {
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                    + " but has no Out nor Fault message");
         }
     }
-    
+
+    private void processAsyncTargetResponse(MessageExchange exchange) throws Exception {
+        // Retrieve the correlation id for the consumer
+        String consumerId = (String) exchange.getProperty(correlationConsumer);
+        if (consumerId == null) {
+            throw new IllegalStateException(correlationConsumer + " property not found");
+        }
+        // Retrieve the correlation id for the transformer
+        String transformerId = (String) exchange.getProperty(correlationTransformer);
+        if (transformerId == null) {
+            throw new IllegalStateException(correlationTransformer + " property not found");
+        }
+        // This should be the last message received
+        if (exchange.getStatus() == ExchangeStatus.DONE) {
+            // Need to ack the transformer
+            MessageExchange tme = (MessageExchange) store.load(transformerId);
+            done(tme);
+            // Need to ack the consumer
+            MessageExchange cme = (MessageExchange) store.load(consumerId);
+            done(cme);
+        // Errors should be sent back to the consumer
+        } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            // Need to ack the transformer
+            MessageExchange tme = (MessageExchange) store.load(transformerId);
+            done(tme);
+            // Send error to consumer
+            MessageExchange cme = (MessageExchange) store.load(consumerId);
+            fail(cme, exchange.getError());
+        // If we have a robust-in-only MEP, we can receive a fault
+        } else if (exchange.getFault() != null) {
+            // Need to ack the transformer
+            MessageExchange tme = (MessageExchange) store.load(transformerId);
+            done(tme);
+            // Send fault back to consumer
+            store.store(exchange.getExchangeId(), exchange);
+            MessageExchange cme = (MessageExchange) store.load(consumerId);
+            cme.setProperty(correlationTarget, exchange.getExchangeId());
+            MessageUtil.transferFaultToFault(exchange, cme);
+            send(cme);
+        // This should not happen
+        } else {
+            throw new IllegalStateException("Exchange from target has a " + ExchangeStatus.ACTIVE
+                    + " status but has no Fault message");
+        }
+    }
+
     protected Definition getDefinitionFromWsdlExchangeTarget() {
         Definition rc = super.getDefinitionFromWsdlExchangeTarget();
-        if( rc !=null ) {
+        if (rc != null) {
             // TODO: This components wsdl is == transformer wsdl without the out message.
             // need to massage the result wsdl so that it described an in only exchange
         }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/SplitAggregator.java Sat Apr  7 01:35:49 2007
@@ -24,14 +24,15 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.dom.DOMSource;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
 import org.apache.servicemix.eip.support.AbstractAggregator;
 import org.apache.servicemix.eip.support.AbstractSplitter;
 import org.apache.servicemix.expression.Expression;
 import org.apache.servicemix.expression.PropertyExpression;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
 
 /**
  * Aggregator can be used to wait and combine several messages.
@@ -180,40 +181,46 @@
     }
 
     /*(non-Javadoc)
-     * @see org.apache.servicemix.eip.support.AggregationFactory#getCorrelationID(javax.jbi.messaging.MessageExchange, javax.jbi.messaging.NormalizedMessage)
+     * @see org.apache.servicemix.eip.support.AggregationFactory#getCorrelationID(
+     *      javax.jbi.messaging.MessageExchange, javax.jbi.messaging.NormalizedMessage)
      */
     public String getCorrelationID(MessageExchange exchange, NormalizedMessage message) throws Exception {
         return (String) corrId.evaluate(exchange, message);
     }
     
     /* (non-Javadoc)
-     * @see org.apache.servicemix.eip.support.Aggregation#addMessage(javax.jbi.messaging.NormalizedMessage, javax.jbi.messaging.MessageExchange)
+     * @see org.apache.servicemix.eip.support.Aggregation#addMessage(
+     *      javax.jbi.messaging.NormalizedMessage, javax.jbi.messaging.MessageExchange)
      */
-    public boolean addMessage(Object aggregation, NormalizedMessage message, MessageExchange exchange) throws Exception {
+    public boolean addMessage(Object aggregation, NormalizedMessage message, MessageExchange exchange) 
+        throws Exception {
         NormalizedMessage[] messages = ((SplitterAggregation) aggregation).messages;
         // Retrieve count, index
-        Integer count = (Integer) SplitAggregator.this.count.evaluate(exchange, message);
-        if (count == null) {
-            throw new IllegalArgumentException("Property " + AbstractSplitter.SPLITTER_COUNT + " not specified on message");
+        Integer cnt = (Integer) SplitAggregator.this.count.evaluate(exchange, message);
+        if (cnt == null) {
+            throw new IllegalArgumentException("Property " + AbstractSplitter.SPLITTER_COUNT
+                    + " not specified on message");
         }
         if (messages == null) {
-            messages = new NormalizedMessage[count.intValue()];
+            messages = new NormalizedMessage[cnt];
             ((SplitterAggregation) aggregation).messages = messages;
-        } else if (count.intValue() != messages.length) {
-            throw new IllegalArgumentException("Property " + AbstractSplitter.SPLITTER_COUNT + " is not consistent (received " + count.intValue() + ", was " + messages.length + ")");
-        }
-        Integer index = (Integer) SplitAggregator.this.index.evaluate(exchange, message);
-        if (index == null) {
-            throw new IllegalArgumentException("Property " + AbstractSplitter.SPLITTER_INDEX + " not specified on message");
+        } else if (cnt != messages.length) {
+            throw new IllegalArgumentException("Property " + AbstractSplitter.SPLITTER_COUNT
+                    + " is not consistent (received " + cnt + ", was " + messages.length + ")");
+        }
+        Integer idx = (Integer) SplitAggregator.this.index.evaluate(exchange, message);
+        if (idx == null) {
+            throw new IllegalArgumentException("Property " + AbstractSplitter.SPLITTER_INDEX
+                    + " not specified on message");
         }
-        if (index.intValue() < 0 || index.intValue() >= messages.length) {
-            throw new IllegalArgumentException("Index is ouf of bound: " + index + " [0.." + messages.length + "]");
+        if (idx < 0 || idx >= messages.length) {
+            throw new IllegalArgumentException("Index is ouf of bound: " + idx + " [0.." + messages.length + "]");
         }
-        if (messages[index.intValue()] != null) {
-            throw new IllegalStateException("Message with index " + index.intValue() + " has already been received");
+        if (messages[idx] != null) {
+            throw new IllegalStateException("Message with index " + idx + " has already been received");
         }
         // Store message
-        messages[index.intValue()] = message;
+        messages[idx] = message;
         // Check if all messages have been received
         for (int i = 0; i < messages.length; i++) {
             if (messages[i] == null) {
@@ -224,9 +231,11 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.eip.support.Aggregation#buildAggregate(javax.jbi.messaging.NormalizedMessage, javax.jbi.messaging.MessageExchange, boolean)
+     * @see org.apache.servicemix.eip.support.Aggregation#buildAggregate(
+     *      javax.jbi.messaging.NormalizedMessage, javax.jbi.messaging.MessageExchange, boolean)
      */
-    public void buildAggregate(Object aggregation, NormalizedMessage message, MessageExchange exchange, boolean timeout) throws Exception {
+    public void buildAggregate(Object aggregation, NormalizedMessage message, 
+            MessageExchange exchange, boolean doTimeout) throws Exception {
         NormalizedMessage[] messages = ((SplitterAggregation) aggregation).messages;
         String correlationId = ((SplitterAggregation) aggregation).correlationId;
         SourceTransformer st = new SourceTransformer();

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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -58,7 +58,7 @@
     /**
      * The correlation property used by this component
      */
-    private String correlation;
+    //private String correlation;
 
     /**
      * @return Returns the recipients.
@@ -98,15 +98,15 @@
             throw new IllegalArgumentException("recipients should contain at least one ExchangeTarget");
         }
         // Create correlation property
-        correlation = "StaticRecipientList.Correlation." + getService() + "." + getEndpoint();
+        //correlation = "StaticRecipientList.Correlation." + getService() + "." + getEndpoint();
     }
     
     /* (non-Javadoc)
      * @see org.apache.servicemix.eip.EIPEndpoint#processSync(javax.jbi.messaging.MessageExchange)
      */
     protected void processSync(MessageExchange exchange) throws Exception {
-        if (exchange instanceof InOnly == false &&
-            exchange instanceof RobustInOnly == false) {
+        if (!(exchange instanceof InOnly)
+            && !(exchange instanceof RobustInOnly)) {
             fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
             return;
         }
@@ -142,8 +142,8 @@
                 return;
             } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
                 return;
-            } else if (exchange instanceof InOnly == false &&
-                       exchange instanceof RobustInOnly == false) {
+            } else if (!(exchange instanceof InOnly)
+                       && !(exchange instanceof RobustInOnly)) {
                 fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
             } else if (exchange.getFault() != null) {
                 done(exchange);

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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -94,7 +94,7 @@
      * @see org.apache.servicemix.eip.EIPEndpoint#processSync(javax.jbi.messaging.MessageExchange)
      */
     protected void processSync(MessageExchange exchange) throws Exception {
-        if (exchange instanceof InOut == false) {
+        if (!(exchange instanceof InOut)) {
             throw new IllegalStateException("Use an InOut MEP");
         }
         MessageExchange current = exchange;
@@ -122,7 +122,8 @@
                 sendSync(exchange);
                 return;
             } else if (me.getOutMessage() == null) {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                        + " but has no Out nor Fault message");
             }
             current = me;
         }
@@ -137,101 +138,110 @@
     protected void processAsync(MessageExchange exchange) throws Exception {
         // This exchange comes from the consumer
         if (exchange.getRole() == MessageExchange.Role.PROVIDER) {
-            if (exchange.getStatus() == ExchangeStatus.DONE) {
-                String correlationId = (String) exchange.getProperty(correlation);
-                if (correlationId == null) {
-                    throw new IllegalStateException(correlation + " property not found");
-                }
-                // Ack last target hit
-                MessageExchange me = (MessageExchange) store.load(correlationId);
-                done(me);
-            } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
-                String correlationId = (String) exchange.getProperty(correlation);
-                if (correlationId == null) {
-                    throw new IllegalStateException(correlation + " property not found");
-                }
-                // Ack last target hit
-                MessageExchange me = (MessageExchange) store.load(correlationId);
-                done(me);
-            } else if (exchange instanceof InOut == false) {
-                throw new IllegalStateException("Use an InOut MEP");
-            } else {
-                MessageExchange me = getExchangeFactory().createInOutExchange();
-                me.setProperty(correlation, exchange.getExchangeId());
-                me.setProperty(index, new Integer(0));
-                targets[0].configureTarget(me, getContext());
-                store.store(exchange.getExchangeId(), exchange);
-                MessageUtil.transferInToIn(exchange, me);
-                send(me);
-            }
+            processProviderAsync(exchange);
         // The exchange comes from a target
         } else {
+            processConsumerAsync(exchange);
+        }
+    }
+
+    protected void processProviderAsync(MessageExchange exchange) throws Exception {
+        if (exchange.getStatus() == ExchangeStatus.DONE) {
             String correlationId = (String) exchange.getProperty(correlation);
-            String previousId = (String) exchange.getProperty(previous);
-            Integer prevIndex = (Integer) exchange.getProperty(index);
             if (correlationId == null) {
                 throw new IllegalStateException(correlation + " property not found");
             }
-            if (prevIndex == null) {
-                throw new IllegalStateException(previous + " property not found");
+            // Ack last target hit
+            MessageExchange me = (MessageExchange) store.load(correlationId);
+            done(me);
+        } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            String correlationId = (String) exchange.getProperty(correlation);
+            if (correlationId == null) {
+                throw new IllegalStateException(correlation + " property not found");
             }
-            // This should never happen, as we can only send DONE
-            if (exchange.getStatus() == ExchangeStatus.DONE) {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.DONE);
-            // ERROR are sent back to the consumer
-            } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            // Ack last target hit
+            MessageExchange me = (MessageExchange) store.load(correlationId);
+            done(me);
+        } else if (!(exchange instanceof InOut)) {
+            throw new IllegalStateException("Use an InOut MEP");
+        } else {
+            MessageExchange me = getExchangeFactory().createInOutExchange();
+            me.setProperty(correlation, exchange.getExchangeId());
+            me.setProperty(index, new Integer(0));
+            targets[0].configureTarget(me, getContext());
+            store.store(exchange.getExchangeId(), exchange);
+            MessageUtil.transferInToIn(exchange, me);
+            send(me);
+        }
+    }
+
+    private void processConsumerAsync(MessageExchange exchange) throws Exception {
+        String correlationId = (String) exchange.getProperty(correlation);
+        String previousId = (String) exchange.getProperty(previous);
+        Integer prevIndex = (Integer) exchange.getProperty(index);
+        if (correlationId == null) {
+            throw new IllegalStateException(correlation + " property not found");
+        }
+        if (prevIndex == null) {
+            throw new IllegalStateException(previous + " property not found");
+        }
+        // This should never happen, as we can only send DONE
+        if (exchange.getStatus() == ExchangeStatus.DONE) {
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.DONE);
+        // ERROR are sent back to the consumer
+        } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
+            MessageExchange me = (MessageExchange) store.load(correlationId);
+            fail(me, exchange.getError());
+            // Ack the previous target
+            if (previousId != null) {
+                me = (MessageExchange) store.load(previousId);
+                done(me);
+            }
+        // Faults are sent back to the consumer
+        } else if (exchange.getFault() != null) {
+            MessageExchange me = (MessageExchange) store.load(correlationId);
+            me.setProperty(correlation, exchange.getExchangeId());
+            store.store(exchange.getExchangeId(), exchange);
+            MessageUtil.transferFaultToFault(exchange, me);
+            send(me);
+            // Ack the previous target
+            if (previousId != null) {
+                me = (MessageExchange) store.load(previousId);
+                done(me);
+            }
+        // Out message, give it to next target or back to consumer
+        } else if (exchange.getMessage("out") != null) {
+            // This is the answer from the last target
+            if (prevIndex.intValue() == targets.length - 1) {
                 MessageExchange me = (MessageExchange) store.load(correlationId);
-                fail(me, exchange.getError());
-                // Ack the previous target
+                me.setProperty(correlation, exchange.getExchangeId());
+                store.store(exchange.getExchangeId(), exchange);
+                MessageUtil.transferOutToOut(exchange, me);
+                send(me);
                 if (previousId != null) {
                     me = (MessageExchange) store.load(previousId);
                     done(me);
                 }
-            // Faults are sent back to the consumer
-            } else if (exchange.getFault() != null) {
-                MessageExchange me = (MessageExchange) store.load(correlationId);
-                me.setProperty(correlation, exchange.getExchangeId());
+            // We still have a target to hit
+            } else {
+                MessageExchange me = getExchangeFactory().createInOutExchange();
+                Integer curIndex = new Integer(prevIndex.intValue() + 1);
+                me.setProperty(correlation, correlationId);
+                me.setProperty(index, curIndex);
+                me.setProperty(previous, exchange.getExchangeId());
+                targets[curIndex.intValue()].configureTarget(me, getContext());
                 store.store(exchange.getExchangeId(), exchange);
-                MessageUtil.transferFaultToFault(exchange, me);
+                MessageUtil.transferOutToIn(exchange, me);
                 send(me);
-                // Ack the previous target
                 if (previousId != null) {
                     me = (MessageExchange) store.load(previousId);
                     done(me);
                 }
-            // Out message, give it to next target or back to consumer
-            } else if (exchange.getMessage("out") != null) {
-                // This is the answer from the last target
-                if (prevIndex.intValue() == targets.length - 1) {
-                    MessageExchange me = (MessageExchange) store.load(correlationId);
-                    me.setProperty(correlation, exchange.getExchangeId());
-                    store.store(exchange.getExchangeId(), exchange);
-                    MessageUtil.transferOutToOut(exchange, me);
-                    send(me);
-                    if (previousId != null) {
-                        me = (MessageExchange) store.load(previousId);
-                        done(me);
-                    }
-                // We still have a target to hit
-                } else {
-                    MessageExchange me = getExchangeFactory().createInOutExchange();
-                    Integer curIndex = new Integer(prevIndex.intValue() + 1);
-                    me.setProperty(correlation, correlationId);
-                    me.setProperty(index, curIndex);
-                    me.setProperty(previous, exchange.getExchangeId());
-                    targets[curIndex.intValue()].configureTarget(me, getContext());
-                    store.store(exchange.getExchangeId(), exchange);
-                    MessageUtil.transferOutToIn(exchange, me);
-                    send(me);
-                    if (previousId != null) {
-                        me = (MessageExchange) store.load(previousId);
-                        done(me);
-                    }
-                }
-            // This should not happen
-            } else {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
             }
+        // This should not happen
+        } else {
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                    + " but has no Out nor Fault message");
         }
     }
 

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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -178,7 +178,8 @@
             done(tme);
         } else {
             done(tme);
-            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                    + " but has no Out nor Fault message");
         }
     }
     
@@ -186,8 +187,8 @@
      * @see org.apache.servicemix.eip.EIPEndpoint#processAsync(javax.jbi.messaging.MessageExchange)
      */
     protected void processAsync(MessageExchange exchange) throws Exception {
-        if (exchange.getRole() == MessageExchange.Role.PROVIDER &&
-            exchange.getProperty(correlation) == null) {
+        if (exchange.getRole() == MessageExchange.Role.PROVIDER
+            && exchange.getProperty(correlation) == null) {
             // Create exchange for target
             MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
             if (store.hasFeature(Store.CLUSTERED)) {
@@ -206,8 +207,8 @@
         } else {
             String id = (String) exchange.getProperty(correlation);
             if (id == null) {
-                if (exchange.getRole() == MessageExchange.Role.CONSUMER &&
-                    exchange.getStatus() != ExchangeStatus.ACTIVE) {
+                if (exchange.getRole() == MessageExchange.Role.CONSUMER
+                    && exchange.getStatus() != ExchangeStatus.ACTIVE) {
                     // This must be a listener status, so ignore
                     return;
                 }
@@ -232,7 +233,8 @@
                 store.store(exchange.getExchangeId(), exchange);
                 sendToListenerAndTarget(exchange, org, outListener, "out", isCopyProperties());
             } else {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                        + " but has no Out nor Fault message");
             }
         }
     }
@@ -241,7 +243,7 @@
                                          MessageExchange dest, 
                                          ExchangeTarget listener,
                                          String message,
-                                         boolean copyProperties) throws Exception {
+                                         boolean copy) throws Exception {
         if (listener != null) {
             NormalizedMessage msg = MessageUtil.copy(source.getMessage(message));
             InOnly lme = getExchangeFactory().createInOnlyExchange();
@@ -252,13 +254,13 @@
             MessageUtil.transferToIn(msg, lme);
             send(lme);
             MessageUtil.transferTo(msg, dest, message);
-            if (copyProperties) {
+            if (copy) {
                 copyExchangeProperties(dest, "in", message);
             }
             send(dest);
         } else {
             MessageUtil.transferTo(source, dest, message);
-            if (copyProperties) {
+            if (copy) {
                 copyExchangeProperties(dest, "in", message);
             }
             send(dest);
@@ -269,7 +271,7 @@
                                              MessageExchange dest, 
                                              ExchangeTarget listener,
                                              String message,
-                                             boolean copyProperties) throws Exception {
+                                             boolean copy) throws Exception {
         if (listener != null) {
             NormalizedMessage msg = MessageUtil.copy(source.getMessage(message));
             InOnly lme = getExchangeFactory().createInOnlyExchange();
@@ -280,13 +282,13 @@
             MessageUtil.transferToIn(msg, lme);
             sendSync(lme);
             MessageUtil.transferTo(msg, dest, message);
-            if (copyProperties) {
+            if (copy) {
                 copyExchangeProperties(dest, "in", message);
             }
             sendSync(dest);
         } else {
             MessageUtil.transferTo(source, dest, message);
-            if (copyProperties) {
+            if (copy) {
                 copyExchangeProperties(dest, "in", message);
             }
             sendSync(dest);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/XPathSplitter.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/XPathSplitter.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/XPathSplitter.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/patterns/XPathSplitter.java Sat Apr  7 01:35:49 2007
@@ -23,13 +23,14 @@
 import javax.xml.xpath.XPathFactory;
 import javax.xml.xpath.XPathFunctionResolver;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
 import org.apache.servicemix.eip.support.AbstractSplitter;
 import org.apache.servicemix.expression.JAXPNodeSetXPathExpression;
 import org.apache.servicemix.expression.MessageVariableResolver;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
 
 /**
  * The XPathSplitter component implements the 
@@ -120,35 +121,40 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.expression.JAXPXPathExpression#setFactory(javax.xml.xpath.XPathFactory)
+     * @see org.apache.servicemix.expression.JAXPXPathExpression#setFactory(
+     *      javax.xml.xpath.XPathFactory)
      */
     public void setFactory(XPathFactory factory) {
         xpathExpression.setFactory(factory);
     }
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.expression.JAXPXPathExpression#setFunctionResolver(javax.xml.xpath.XPathFunctionResolver)
+     * @see org.apache.servicemix.expression.JAXPXPathExpression#setFunctionResolver(
+     *      javax.xml.xpath.XPathFunctionResolver)
      */
     public void setFunctionResolver(XPathFunctionResolver functionResolver) {
         xpathExpression.setFunctionResolver(functionResolver);
     }
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.expression.JAXPXPathExpression#setNamespaceContext(javax.xml.namespace.NamespaceContext)
+     * @see org.apache.servicemix.expression.JAXPXPathExpression#setNamespaceContext(
+     *      javax.xml.namespace.NamespaceContext)
      */
     public void setNamespaceContext(NamespaceContext namespaceContext) {
         xpathExpression.setNamespaceContext(namespaceContext);
     }
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.expression.JAXPXPathExpression#setTransformer(org.apache.servicemix.jbi.jaxp.SourceTransformer)
+     * @see org.apache.servicemix.expression.JAXPXPathExpression#setTransformer(
+     *      org.apache.servicemix.jbi.jaxp.SourceTransformer)
      */
     public void setTransformer(SourceTransformer transformer) {
         xpathExpression.setTransformer(transformer);
     }
 
     /* (non-Javadoc)
-     * @see org.apache.servicemix.expression.JAXPXPathExpression#setVariableResolver(org.apache.servicemix.expression.MessageVariableResolver)
+     * @see org.apache.servicemix.expression.JAXPXPathExpression#setVariableResolver(
+     *      org.apache.servicemix.expression.MessageVariableResolver)
      */
     public void setVariableResolver(MessageVariableResolver variableResolver) {
         xpathExpression.setVariableResolver(variableResolver);

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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -49,7 +49,7 @@
  */
 public abstract class AbstractAggregator extends EIPEndpoint {
 
-    private static final Log log = LogFactory.getLog(AbstractAggregator.class);
+    private static final Log LOG = LogFactory.getLog(AbstractAggregator.class);
 
     private ExchangeTarget target;
     
@@ -127,61 +127,65 @@
             return;
         // Handle an ACTIVE exchange as a PROVIDER
         } else if (exchange.getRole() == MessageExchange.Role.PROVIDER) {
-            if (exchange instanceof InOnly == false &&
-                exchange instanceof RobustInOnly == false) {
+            if (!(exchange instanceof InOnly)
+                && !(exchange instanceof RobustInOnly)) {
                 fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
             } else {
-                NormalizedMessage in = MessageUtil.copyIn(exchange);
-                final String correlationId = getCorrelationID(exchange, in);
-                if (correlationId == null || correlationId.length() == 0) {
-                    throw new IllegalArgumentException("Could not retrieve correlation id for incoming exchange");
+                processProvider(exchange);
+            }
+        // Handle an ACTIVE exchange as a CONSUMER
+        } else if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
+            done(exchange);
+        }
+    }
+    
+    private void processProvider(MessageExchange exchange) throws Exception {
+        NormalizedMessage in = MessageUtil.copyIn(exchange);
+        final String correlationId = getCorrelationID(exchange, in);
+        if (correlationId == null || correlationId.length() == 0) {
+            throw new IllegalArgumentException("Could not retrieve correlation id for incoming exchange");
+        }
+        // Load existing aggregation
+        Lock lock = getLockManager().getLock(correlationId);
+        lock.lock();
+        try {
+            Object aggregation = store.load(correlationId);
+            Date timeout = null;
+            // Create a new aggregate
+            if (aggregation == null) {
+                if (isAggregationClosed(correlationId)) {
+                    // TODO: should we return an error here ?
+                } else {
+                    aggregation = createAggregation(correlationId);
+                    timeout = getTimeout(aggregation);
                 }
-                // Load existing aggregation
-                Lock lock = getLockManager().getLock(correlationId);
-                lock.lock();
-                try {
-                    Object aggregation = store.load(correlationId);
-                    Date timeout = null;
-                    // Create a new aggregate
-                    if (aggregation == null) {
-                        if (isAggregationClosed(correlationId)) {
-                            // TODO: should we return an error here ?
-                        } else {
-                            aggregation = createAggregation(correlationId);
-                            timeout = getTimeout(aggregation);
+            } else if (isRescheduleTimeouts()) {
+                timeout = getTimeout(aggregation);
+            }
+            // If the aggregation is not closed
+            if (aggregation != null) {
+                if (addMessage(aggregation, in, exchange)) {
+                    sendAggregate(correlationId, aggregation, false);
+                } else {
+                    store.store(correlationId, aggregation);
+                    if (timeout != null) {
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("Scheduling timeout at " + timeout + " for aggregate " + correlationId);
                         }
-                    } else if (isRescheduleTimeouts()) {
-                        timeout = getTimeout(aggregation);
-                    }
-                    // If the aggregation is not closed
-                    if (aggregation != null) {
-                        if (addMessage(aggregation, in, exchange)) {
-                            sendAggregate(correlationId, aggregation, false);
-                        } else {
-                            store.store(correlationId, aggregation);
-                            if (timeout != null) {
-                                if (log.isDebugEnabled()) {
-                                    log.debug("Scheduling timeout at " + timeout + " for aggregate " + correlationId);
-                                }
-                                getTimerManager().schedule(new TimerListener() {
-                                    public void timerExpired(Timer timer) {
-                                        AbstractAggregator.this.onTimeout(correlationId);
-                                    }
-                                }, timeout);
+                        getTimerManager().schedule(new TimerListener() {
+                            public void timerExpired(Timer timer) {
+                                AbstractAggregator.this.onTimeout(correlationId);
                             }
-                        }
+                        }, timeout);
                     }
-                    done(exchange);
-                } finally {
-                    lock.unlock();
                 }
             }
-        // Handle an ACTIVE exchange as a CONSUMER
-        } else if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
             done(exchange);
+        } finally {
+            lock.unlock();
         }
     }
-    
+
     protected void sendAggregate(String correlationId,
                                  Object aggregation,
                                  boolean timeout) throws Exception {
@@ -199,8 +203,8 @@
     }
 
     protected void onTimeout(String correlationId) {
-        if (log.isDebugEnabled()) {
-            log.debug("Timeout expired for aggregate " + correlationId);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Timeout expired for aggregate " + correlationId);
         }
         Lock lock = getLockManager().getLock(correlationId);
         lock.lock();
@@ -211,12 +215,12 @@
             } else if (!isAggregationClosed(correlationId)) {
                 throw new IllegalStateException("Aggregation is not closed, but can not be retrieved from the store");
             } else {
-                if (log.isDebugEnabled()) {
-                    log.debug("Aggregate " + correlationId + " is closed");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Aggregate " + correlationId + " is closed");
                 }
             }
         } catch (Exception e) {
-            log.info("Caught exception while processing timeout aggregation", e);
+            LOG.info("Caught exception while processing timeout aggregation", e);
         } finally {
             lock.unlock();
         }
@@ -286,7 +290,8 @@
      * @param aggregate
      * @param message
      * @param exchange
-     * @param timeout <code>false</code> if the aggregation has completed or <code>true</code> if this aggregation has timed out
+     * @param timeout <code>false</code> if the aggregation has completed or <code>true</code> 
+     *                  if this aggregation has timed out
      */
     protected abstract void buildAggregate(Object aggregate,
                                            NormalizedMessage message, 

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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -85,7 +85,8 @@
             sendSync(exchange);
         } else {
             done(tme);
-            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
+            throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                    + " but has no Out nor Fault message");
         }
     }
 
@@ -93,8 +94,8 @@
      * @see org.apache.servicemix.eip.EIPEndpoint#processAsync(javax.jbi.messaging.MessageExchange)
      */
     protected void processAsync(MessageExchange exchange) throws Exception {
-        if (exchange.getRole() == MessageExchange.Role.PROVIDER &&
-            exchange.getProperty(correlation) == null) {
+        if (exchange.getRole() == MessageExchange.Role.PROVIDER
+            && exchange.getProperty(correlation) == null) {
             // Create exchange for target
             MessageExchange tme = getExchangeFactory().createExchange(exchange.getPattern());
             if (store.hasFeature(Store.CLUSTERED)) {
@@ -143,7 +144,8 @@
                 MessageUtil.transferTo(exchange, org, "out"); 
                 send(org);
             } else {
-                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Out nor Fault message");
+                throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                        + " but has no Out nor Fault message");
             }
         }
     }

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=526407&r1=526406&r2=526407
==============================================================================
--- 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 Sat Apr  7 01:35:49 2007
@@ -71,7 +71,7 @@
     /**
      * The correlation property used by this component
      */
-    private String correlation;
+    //private String correlation;
     /**
      * Specifies wether exchanges for all parts are sent synchronously or not.
      */
@@ -164,15 +164,15 @@
     public void start() throws Exception {
         super.start();
         // Create correlation property
-        correlation = "Splitter.Correlation." + getContext().getComponentName();
+        //correlation = "Splitter.Correlation." + getContext().getComponentName();
     }
 
     /* (non-Javadoc)
      * @see org.apache.servicemix.eip.EIPEndpoint#processSync(javax.jbi.messaging.MessageExchange)
      */
     protected void processSync(MessageExchange exchange) throws Exception {
-        if (exchange instanceof InOnly == false && 
-            exchange instanceof RobustInOnly == false) {
+        if (!(exchange instanceof InOnly)
+            && !(exchange instanceof RobustInOnly)) {
             fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
             return;
         }
@@ -198,7 +198,8 @@
                         done(parts[i]);
                     }
                 } else {
-                    throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE + " but has no Fault message");
+                    throw new IllegalStateException("Exchange status is " + ExchangeStatus.ACTIVE
+                            + " but has no Fault message");
                 }
             } else {
                 send(parts[i]);
@@ -225,8 +226,7 @@
                 return;
             } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
                 return;
-            } else if (exchange instanceof InOnly == false &&
-                       exchange instanceof RobustInOnly == false) {
+            } else if (!(exchange instanceof InOnly) && !(exchange instanceof RobustInOnly)) {
                 fail(exchange, new UnsupportedOperationException("Use an InOnly or RobustInOnly MEP"));
             } else if (exchange.getFault() != null) {
                 done(exchange);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/ExchangeTarget.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/ExchangeTarget.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/ExchangeTarget.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/ExchangeTarget.java Sat Apr  7 01:35:49 2007
@@ -36,7 +36,7 @@
  */
 public class ExchangeTarget implements InitializingBean {
 
-    private QName _interface;
+    private QName interf;
 
     private QName operation;
 
@@ -65,15 +65,15 @@
      * @return Returns the interface name.
      */
     public QName getInterface() {
-        return _interface;
+        return interf;
     }
 
     /**
      * @param interface name
      *            The interface name to set.
      */
-    public void setInterface(QName _interface) {
-        this._interface = _interface;
+    public void setInterface(QName itf) {
+        this.interf = itf;
     }
 
     /**
@@ -126,14 +126,14 @@
      * @throws MessagingException if the target could not be configured
      */
     public void configureTarget(MessageExchange exchange, ComponentContext context) throws MessagingException {
-        if (_interface == null && service == null && uri == null) {
+        if (interf == null && service == null && uri == null) {
             throw new MessagingException("interface, service or uri should be specified");
         }
         if (uri != null) {
             URIResolver.configureExchange(exchange, context, uri);
         }
-        if (_interface != null) {
-            exchange.setInterfaceName(_interface);
+        if (interf != null) {
+            exchange.setInterfaceName(interf);
         }
         if (operation != null) {
             exchange.setOperation(operation);
@@ -151,7 +151,7 @@
      * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
      */
     public void afterPropertiesSet() throws Exception {
-        if (_interface == null && service == null && uri == null) {
+        if (interf == null && service == null && uri == null) {
             throw new MessagingException("interface, service or uri should be specified");
         }
     }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/NamespaceContextImpl.java Sat Apr  7 01:35:49 2007
@@ -42,13 +42,14 @@
      * is used to ensure that {@link #getPrefix(String)} always returns the same
      * prefix, unless that prefix is removed.
      */
-    private Map<String,String> namespaces = new LinkedHashMap<String,String>();
+    private Map<String, String> namespaces;
     
     /**
      * Constructs a SimpleNamespaceContext with no parent context or namespace
      * declarations.
      */
     public NamespaceContextImpl() {
+        this.namespaces = new LinkedHashMap<String, String>();
     }
     
     /**
@@ -58,21 +59,21 @@
      * @param namespaces A Map of namespace URIs, keyed by their prefixes.
      */
     public NamespaceContextImpl(Map<String, String> namespaces) {
-        setNamespaces(namespaces);
+        this.namespaces = new LinkedHashMap<String, String>(namespaces);
     }
     
     /**
      * @org.apache.xbean.Map entryName="namespace" keyName="prefix"
      * @return Returns the namespaces.
      */
-    public Map<String,String> getNamespaces() {
+    public Map<String, String> getNamespaces() {
         return namespaces;
     }
 
     /**
      * @param namespaces The namespaces to set.
      */
-    public void setNamespaces(Map<String,String> namespaces) {
+    public void setNamespaces(Map<String, String> namespaces) {
         this.namespaces.clear();
         if (namespaces != null) {
             this.namespaces.putAll(namespaces);
@@ -143,7 +144,7 @@
             return Collections.singleton(XMLConstants.XMLNS_ATTRIBUTE).iterator();
         }
         Set<String> prefixes = null;
-        for (Map.Entry<String,String> entry : namespaces.entrySet()) {
+        for (Map.Entry<String, String> entry : namespaces.entrySet()) {
             String uri = entry.getValue();
             if (uri.equals(nsURI)) {
                 if (prefixes == null) {

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/Predicate.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/Predicate.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/Predicate.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/Predicate.java Sat Apr  7 01:35:49 2007
@@ -24,6 +24,6 @@
  */
 public interface Predicate {
 
-    public boolean matches(MessageExchange exchange);
+    boolean matches(MessageExchange exchange);
 
 }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/main/java/org/apache/servicemix/eip/support/XPathPredicate.java Sat Apr  7 01:35:49 2007
@@ -30,7 +30,7 @@
  */
 public class XPathPredicate extends JAXPBooleanXPathExpression implements Predicate {
 
-    private static final Log log = LogFactory.getLog(XPathPredicate.class);
+    private static final Log LOG = LogFactory.getLog(XPathPredicate.class);
     
     public XPathPredicate() {
     }
@@ -48,7 +48,7 @@
             Boolean match = (Boolean) evaluate(exchange, in);
             return Boolean.TRUE.equals(match);
         } catch (Exception e) {
-            log.warn("Could not evaluate xpath expression", e);
+            LOG.warn("Could not evaluate xpath expression", e);
             return false;
         }
     }

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTest.java Sat Apr  7 01:35:49 2007
@@ -101,7 +101,7 @@
         EIPComponent eip = new EIPComponent();
         endpoint.setService(new QName(name));
         endpoint.setEndpoint("ep");
-        eip.setEndpoints(new EIPEndpoint[] { endpoint });
+        eip.setEndpoints(new EIPEndpoint[] {endpoint });
         jbi.activateComponent(eip, name);
     }
     
@@ -118,7 +118,8 @@
     protected static class ReturnOutComponent extends ComponentSupport implements MessageExchangeListener {
         public void onMessageExchange(MessageExchange exchange) throws MessagingException {
             if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
-                boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
+                boolean txSync = exchange.isTransacted()
+                    && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
                 if (exchange.getMessage("out") == null) {
                     NormalizedMessage out = exchange.createMessage();
                     out.setContent(createSource("<outMsg/>"));
@@ -151,7 +152,8 @@
         }
         public void onMessageExchange(MessageExchange exchange) throws MessagingException {
             if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
-                boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
+                boolean txSync = exchange.isTransacted()
+                    && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
                 NormalizedMessage out = exchange.createMessage();
                 out.setContent(createSource(response));
                 exchange.setMessage(out, "out");
@@ -168,7 +170,8 @@
         public void onMessageExchange(MessageExchange exchange) throws MessagingException {
             if (exchange.getStatus() == ExchangeStatus.ACTIVE) {
                 if (exchange.getMessage("out") == null) {
-                    boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
+                    boolean txSync = exchange.isTransacted()
+                        && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
                     NormalizedMessage out = exchange.createMessage();
                     out.setContent(createSource("<outMsg/>"));
                     exchange.setMessage(out, "out");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTransactionalTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTransactionalTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTransactionalTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/AbstractEIPTransactionalTest.java Sat Apr  7 01:35:49 2007
@@ -69,7 +69,7 @@
         store = storeFactory.open("store");
         
         jbi = new JBIContainer();
-        jbi.setFlows(new Flow[] { new SedaFlow(), new JCAFlow() });
+        jbi.setFlows(new Flow[] {new SedaFlow(), new JCAFlow() });
         jbi.setEmbedded(true);
         jbi.setUseMBeanServer(false);
         jbi.setCreateMBeanServer(false);

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTest.java Sat Apr  7 01:35:49 2007
@@ -21,12 +21,13 @@
 import javax.jbi.messaging.InOut;
 import javax.xml.namespace.QName;
 
+import org.w3c.dom.Node;
+
 import org.apache.servicemix.eip.patterns.ContentBasedRouter;
 import org.apache.servicemix.eip.support.RoutingRule;
 import org.apache.servicemix.eip.support.XPathPredicate;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.tck.ReceiverComponent;
-import org.w3c.dom.Node;
 
 public class ContentBasedRouterTest extends AbstractEIPTest {
 
@@ -37,15 +38,15 @@
 
         router = new ContentBasedRouter();
         router.setRules(new RoutingRule[] {
-                new RoutingRule(
-                        new XPathPredicate("/hello/@id = '1'"),
-                        createServiceExchangeTarget(new QName("target1"))),
-                new RoutingRule(
-                        new XPathPredicate("/hello/@id = '2'"),
-                        createServiceExchangeTarget(new QName("target2"))),
-                new RoutingRule(
-                        null,
-                        createServiceExchangeTarget(new QName("target3")))
+            new RoutingRule(
+                    new XPathPredicate("/hello/@id = '1'"),
+                    createServiceExchangeTarget(new QName("target1"))),
+            new RoutingRule(
+                    new XPathPredicate("/hello/@id = '2'"),
+                    createServiceExchangeTarget(new QName("target2"))),
+            new RoutingRule(
+                    null,
+                    createServiceExchangeTarget(new QName("target3")))
         });
         configurePattern(router);
         activateComponent(router, "router");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTxTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTxTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTxTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentBasedRouterTxTest.java Sat Apr  7 01:35:49 2007
@@ -21,12 +21,13 @@
 import javax.jbi.messaging.InOut;
 import javax.xml.namespace.QName;
 
+import org.w3c.dom.Node;
+
 import org.apache.servicemix.eip.patterns.ContentBasedRouter;
 import org.apache.servicemix.eip.support.RoutingRule;
 import org.apache.servicemix.eip.support.XPathPredicate;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.tck.ReceiverComponent;
-import org.w3c.dom.Node;
 
 public class ContentBasedRouterTxTest extends AbstractEIPTransactionalTest {
 
@@ -37,15 +38,15 @@
 
         router = new ContentBasedRouter();
         router.setRules(new RoutingRule[] {
-                new RoutingRule(
-                        new XPathPredicate("/hello/@id = '1'"),
-                        createServiceExchangeTarget(new QName("target1"))),
-                new RoutingRule(
-                        new XPathPredicate("/hello/@id = '2'"),
-                        createServiceExchangeTarget(new QName("target2"))),
-                new RoutingRule(
-                        null,
-                        createServiceExchangeTarget(new QName("target3")))
+            new RoutingRule(
+                    new XPathPredicate("/hello/@id = '1'"),
+                    createServiceExchangeTarget(new QName("target1"))),
+            new RoutingRule(
+                    new XPathPredicate("/hello/@id = '2'"),
+                    createServiceExchangeTarget(new QName("target2"))),
+            new RoutingRule(
+                    null,
+                    createServiceExchangeTarget(new QName("target3")))
         });
         configurePattern(router);
         activateComponent(router, "router");

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentEnricherTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentEnricherTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentEnricherTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/ContentEnricherTest.java Sat Apr  7 01:35:49 2007
@@ -23,11 +23,12 @@
 import javax.xml.namespace.QName;
 import javax.xml.transform.dom.DOMSource;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
 import org.apache.servicemix.eip.patterns.ContentEnricher;
 import org.apache.servicemix.jbi.util.DOMUtil;
 import org.apache.servicemix.tck.ReceiverComponent;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 public class ContentEnricherTest extends AbstractEIPTest {
 

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/DeploymentTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/DeploymentTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/DeploymentTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/DeploymentTest.java Sat Apr  7 01:35:49 2007
@@ -20,9 +20,9 @@
 import java.net.URI;
 import java.net.URL;
 
-import org.apache.servicemix.jbi.container.JBIContainer;
-
 import junit.framework.TestCase;
+
+import org.apache.servicemix.jbi.container.JBIContainer;
 
 public class DeploymentTest extends TestCase {
 

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/PipelineTxTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/PipelineTxTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/PipelineTxTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/PipelineTxTest.java Sat Apr  7 01:35:49 2007
@@ -79,7 +79,7 @@
     
     public void testInOnlySyncWithError() throws Exception {
         activateComponent(new ReturnErrorComponent(), "transformer");
-        ReceiverComponent target = activateReceiver("target");
+        activateReceiver("target");
 
         tm.begin();
         
@@ -96,7 +96,7 @@
     
     public void testInOnlyAsyncWithError() throws Exception {
         activateComponent(new ReturnErrorComponent(), "transformer");
-        ReceiverComponent target = activateReceiver("target");
+        activateReceiver("target");
 
         tm.begin();
         

Modified: incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SplitAggregatorTest.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SplitAggregatorTest.java?view=diff&rev=526407&r1=526406&r2=526407
==============================================================================
--- incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SplitAggregatorTest.java (original)
+++ incubator/servicemix/trunk/deployables/serviceengines/servicemix-eip/src/test/java/org/apache/servicemix/eip/SplitAggregatorTest.java Sat Apr  7 01:35:49 2007
@@ -71,6 +71,6 @@
     
     public void testWithTimeout() throws Exception {
         aggregator.setTimeout(500);
-        testRun(new boolean[] { true, false, true });
+        testRun(new boolean[] {true, false, true });
     }
 }



Mime
View raw message