camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r751357 [2/2] - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/management/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/model/confi...
Date Sun, 08 Mar 2009 02:14:09 GMT
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ErrorHandlerSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ErrorHandlerSupport.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ErrorHandlerSupport.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/ErrorHandlerSupport.java Sun Mar  8 02:14:07 2009
@@ -23,7 +23,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.impl.ServiceSupport;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 import org.apache.camel.processor.exceptionpolicy.DefaultExceptionPolicyStrategy;
 import org.apache.camel.processor.exceptionpolicy.ExceptionPolicyKey;
 import org.apache.camel.processor.exceptionpolicy.ExceptionPolicyStrategy;
@@ -34,10 +34,10 @@
  * @version $Revision$
  */
 public abstract class ErrorHandlerSupport extends ServiceSupport implements ErrorHandler {
-    private Map<ExceptionPolicyKey, ExceptionDefinition> exceptionPolicies = new LinkedHashMap<ExceptionPolicyKey, ExceptionDefinition>();
+    private Map<ExceptionPolicyKey, OnExceptionDefinition> exceptionPolicies = new LinkedHashMap<ExceptionPolicyKey, OnExceptionDefinition>();
     private ExceptionPolicyStrategy exceptionPolicy = createDefaultExceptionPolicyStrategy();
 
-    public void addExceptionPolicy(ExceptionDefinition exceptionType) {
+    public void addExceptionPolicy(OnExceptionDefinition exceptionType) {
         Processor processor = exceptionType.getErrorHandler();
         addChildService(processor);
 
@@ -53,7 +53,7 @@
      * Attempts to invoke the handler for this particular exception if one is available
      */
     protected boolean customProcessorForException(Exchange exchange, Throwable exception) throws Exception {
-        ExceptionDefinition policy = getExceptionPolicy(exchange, exception);
+        OnExceptionDefinition policy = getExceptionPolicy(exchange, exception);
         if (policy != null) {
             Processor processor = policy.getErrorHandler();
             if (processor != null) {
@@ -65,13 +65,13 @@
     }
 
     /**
-     * Attempts to find the best suited {@link ExceptionDefinition} to be used for handling the given thrown exception.
+     * Attempts to find the best suited {@link OnExceptionDefinition} to be used for handling the given thrown exception.
      *
      * @param exchange  the exchange
      * @param exception the exception that was thrown
      * @return the best exception type to handle this exception, <tt>null</tt> if none found.
      */
-    protected ExceptionDefinition getExceptionPolicy(Exchange exchange, Throwable exception) {
+    protected OnExceptionDefinition getExceptionPolicy(Exchange exchange, Throwable exception) {
         if (exceptionPolicy == null) {
             throw new IllegalStateException("The exception policy has not been set");
         }
@@ -80,7 +80,7 @@
     }
 
     /**
-     * Sets the strategy to use for resolving the {@link ExceptionDefinition} to use
+     * Sets the strategy to use for resolving the {@link OnExceptionDefinition} to use
      * for handling thrown exceptions.
      */
     public void setExceptionPolicy(ExceptionPolicyStrategy exceptionPolicy) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategy.java Sun Mar  8 02:14:07 2009
@@ -24,12 +24,12 @@
 import java.util.Set;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 /**
- * The default strategy used in Camel to resolve the {@link org.apache.camel.model.ExceptionDefinition} that should
+ * The default strategy used in Camel to resolve the {@link org.apache.camel.model.OnExceptionDefinition} that should
  * handle the thrown exception.
  * <p/>
  * <b>Selection strategy:</b>
@@ -39,7 +39,7 @@
  * by is selected first, ending with the thrown exception itself. The method {@link #createExceptionIterator(Throwable)}
  * provides the Iterator used for the walking.</li>
  * <li>The exception type must be configured with an Exception that is an instance of the thrown exception, this
- * is tested using the {@link #filter(org.apache.camel.model.ExceptionDefinition, Class, Throwable)} method.
+ * is tested using the {@link #filter(org.apache.camel.model.OnExceptionDefinition, Class, Throwable)} method.
  * By default the filter uses <tt>instanceof</tt> test.</li>
  * <li>If the exception type has <b>exactly</b> the thrown exception then its selected as its an exact match</li>
  * <li>Otherwise the type that has an exception that is the closets super of the thrown exception is selected
@@ -47,8 +47,8 @@
  * </ul>
  * <p/>
  * <b>Fine grained matching:</b>
- * <br/> If the {@link ExceptionDefinition} has a when defined with an expression the type is also matches against
- * the current exchange using the {@link #matchesWhen(org.apache.camel.model.ExceptionDefinition, org.apache.camel.Exchange)}
+ * <br/> If the {@link OnExceptionDefinition} has a when defined with an expression the type is also matches against
+ * the current exchange using the {@link #matchesWhen(org.apache.camel.model.OnExceptionDefinition, org.apache.camel.Exchange)}
  * method. This can be used to for more fine grained matching, so you can e.g. define multiple sets of
  * exception types with the same exception class(es) but have a predicate attached to select which to select at runtime.
  */
@@ -56,13 +56,13 @@
 
     private static final transient Log LOG = LogFactory.getLog(DefaultExceptionPolicyStrategy.class);
 
-    public ExceptionDefinition getExceptionPolicy(Map<ExceptionPolicyKey, ExceptionDefinition> exceptionPolicices, Exchange exchange,
+    public OnExceptionDefinition getExceptionPolicy(Map<ExceptionPolicyKey, OnExceptionDefinition> exceptionPolicices, Exchange exchange,
                                             Throwable exception) {
 
         // recursive up the tree using the iterator
         Iterator<Throwable> it = createExceptionIterator(exception); 
         while (it.hasNext()) {
-            ExceptionDefinition type = findMatchedExceptionPolicy(exceptionPolicices, exchange, it.next());
+            OnExceptionDefinition type = findMatchedExceptionPolicy(exceptionPolicices, exchange, it.next());
             if (type != null) {
                 return type;
             }
@@ -73,7 +73,7 @@
     }
 
 
-    private ExceptionDefinition findMatchedExceptionPolicy(Map<ExceptionPolicyKey, ExceptionDefinition> exceptionPolicices, Exchange exchange,
+    private OnExceptionDefinition findMatchedExceptionPolicy(Map<ExceptionPolicyKey, OnExceptionDefinition> exceptionPolicices, Exchange exchange,
                                                Throwable exception) {
         if (LOG.isDebugEnabled()) {
             LOG.debug("Finding best suited exception policy for thrown exception " + exception.getClass().getName());
@@ -82,15 +82,15 @@
         // the goal is to find the exception with the same/closet inheritance level as the target exception being thrown
         int targetLevel = getInheritanceLevel(exception.getClass());
         // candidate is the best candidate found so far to return
-        ExceptionDefinition candidate = null;
+        OnExceptionDefinition candidate = null;
         // difference in inheritance level between the current candidate and the thrown exception (target level)
         int candidateDiff = Integer.MAX_VALUE;
 
         // loop through all the entries and find the best candidates to use
-        Set<Map.Entry<ExceptionPolicyKey, ExceptionDefinition>> entries = exceptionPolicices.entrySet();
-        for (Map.Entry<ExceptionPolicyKey, ExceptionDefinition> entry : entries) {
+        Set<Map.Entry<ExceptionPolicyKey, OnExceptionDefinition>> entries = exceptionPolicices.entrySet();
+        for (Map.Entry<ExceptionPolicyKey, OnExceptionDefinition> entry : entries) {
             Class clazz = entry.getKey().getExceptionClass();
-            ExceptionDefinition type = entry.getValue();
+            OnExceptionDefinition type = entry.getValue();
 
             if (filter(type, clazz, exception)) {
 
@@ -139,7 +139,7 @@
      * @param exception      the thrown exception
      * @return <tt>true</tt> if the to current exception class is a candidate, <tt>false</tt> to skip it.
      */
-    protected boolean filter(ExceptionDefinition type, Class exceptionClass, Throwable exception) {
+    protected boolean filter(OnExceptionDefinition type, Class exceptionClass, Throwable exception) {
         // must be instance of check to ensure that the exceptionClass is one type of the thrown exception
         return exceptionClass.isInstance(exception);
     }
@@ -157,7 +157,7 @@
      * @param exchange the current {@link Exchange}
      * @return <tt>true</tt> if matched, <tt>false</tt> otherwise.
      */
-    protected boolean matchesWhen(ExceptionDefinition type, Exchange exchange) {
+    protected boolean matchesWhen(OnExceptionDefinition type, Exchange exchange) {
         if (type.getOnWhen() == null || type.getOnWhen().getExpression() == null) {
             // if no predicate then it's always a match
             return true;
@@ -167,7 +167,7 @@
 
     /**
      * Strategy method creating the iterator to walk the exception in the order Camel should use
-     * for find the {@link ExceptionDefinition} should be used.
+     * for find the {@link OnExceptionDefinition} should be used.
      * <p/>
      * The default iterator will walk from the bottom upwards
      * (the last caused by going upwards to the exception)

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/ExceptionPolicyStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/ExceptionPolicyStrategy.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/ExceptionPolicyStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/ExceptionPolicyStrategy.java Sun Mar  8 02:14:07 2009
@@ -19,10 +19,10 @@
 import java.util.Map;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 
 /**
- * A strategy to determine which {@link org.apache.camel.model.ExceptionDefinition} should handle the thrown
+ * A strategy to determine which {@link org.apache.camel.model.OnExceptionDefinition} should handle the thrown
  * exception.
  *
  * @see org.apache.camel.processor.exceptionpolicy.DefaultExceptionPolicyStrategy DefaultExceptionPolicy
@@ -30,14 +30,14 @@
 public interface ExceptionPolicyStrategy {
 
     /**
-     * Resolves the {@link org.apache.camel.model.ExceptionDefinition} that should handle the thrown exception.
+     * Resolves the {@link org.apache.camel.model.OnExceptionDefinition} that should handle the thrown exception.
      *
      * @param exceptionPolicices the configured exception policies to resolve from
      * @param exchange           the exchange
      * @param exception          the exception that was thrown
      * @return the resolved exception type to handle this exception, <tt>null</tt> if none found.
      */
-    ExceptionDefinition getExceptionPolicy(Map<ExceptionPolicyKey, ExceptionDefinition> exceptionPolicices, Exchange exchange,
+    OnExceptionDefinition getExceptionPolicy(Map<ExceptionPolicyKey, OnExceptionDefinition> exceptionPolicices, Exchange exchange,
                                             Throwable exception);
 
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/StreamCachingInterceptor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/StreamCachingInterceptor.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/StreamCachingInterceptor.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/StreamCachingInterceptor.java Sun Mar  8 02:14:07 2009
@@ -24,8 +24,8 @@
 import org.apache.camel.NoTypeConversionAvailableException;
 import org.apache.camel.Processor;
 import org.apache.camel.StreamCache;
+import org.apache.camel.model.AbstractInterceptorDefinition;
 import org.apache.camel.model.InterceptorDefinition;
-import org.apache.camel.model.InterceptorRef;
 import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.util.AsyncProcessorHelper;
 import org.apache.camel.util.MessageHelper;
@@ -54,11 +54,11 @@
      *
      * @param interceptors the list of interceptors
      */
-    public static void noStreamCaching(List<InterceptorDefinition> interceptors) {
+    public static void noStreamCaching(List<AbstractInterceptorDefinition> interceptors) {
         for (int i = 0; i < interceptors.size(); i++) {
-            InterceptorDefinition interceptor = interceptors.get(i);
-            if (interceptor instanceof InterceptorRef
-                && ((InterceptorRef)interceptor).getInterceptor() instanceof StreamCachingInterceptor) {
+            AbstractInterceptorDefinition interceptor = interceptors.get(i);
+            if (interceptor instanceof InterceptorDefinition
+                && ((InterceptorDefinition)interceptor).getInterceptor() instanceof StreamCachingInterceptor) {
                 interceptors.remove(interceptor);
             }
         }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java Sun Mar  8 02:14:07 2009
@@ -24,7 +24,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.model.InterceptorRef;
+import org.apache.camel.model.InterceptorDefinition;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.processor.DelegateProcessor;
 import org.apache.camel.processor.Logger;
@@ -243,7 +243,7 @@
         if (node == null) {
             return false;
         }
-        if (!tracer.isTraceInterceptors() && (node instanceof InterceptStrategy || node instanceof InterceptorRef)) {
+        if (!tracer.isTraceInterceptors() && (node instanceof InterceptStrategy || node instanceof InterceptorDefinition)) {
             return false;
         }
         return true;

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/view/NodeData.java Sun Mar  8 02:14:07 2009
@@ -19,17 +19,17 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.camel.model.AggregatorDefinition;
-import org.apache.camel.model.BeanRef;
+import org.apache.camel.model.AggregateDefinition;
+import org.apache.camel.model.BeanDefinition;
 import org.apache.camel.model.ChoiceDefinition;
 import org.apache.camel.model.FilterDefinition;
 import org.apache.camel.model.FromDefinition;
 import org.apache.camel.model.OtherwiseDefinition;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.model.RecipientListDefinition;
-import org.apache.camel.model.ResequencerDefinition;
+import org.apache.camel.model.ResequenceDefinition;
 import org.apache.camel.model.RoutingSlipDefinition;
-import org.apache.camel.model.SplitterDefinition;
+import org.apache.camel.model.SplitDefinition;
 import org.apache.camel.model.ToDefinition;
 import org.apache.camel.model.WhenDefinition;
 
@@ -109,17 +109,17 @@
             this.nodeType = "Routing Slip";
             this.url = "http://camel.apache.org/routing-slip.html";
             this.tooltop = ((RoutingSlipDefinition) node).getHeaderName();
-        } else if (node instanceof SplitterDefinition) {
+        } else if (node instanceof SplitDefinition) {
             this.image = imagePrefix + "SplitterIcon.png";
             this.nodeType = "Splitter";
-        } else if (node instanceof AggregatorDefinition) {
+        } else if (node instanceof AggregateDefinition) {
             this.image = imagePrefix + "AggregatorIcon.png";
             this.nodeType = "Aggregator";
-        } else if (node instanceof ResequencerDefinition) {
+        } else if (node instanceof ResequenceDefinition) {
             this.image = imagePrefix + "ResequencerIcon.png";
             this.nodeType = "Resequencer";
-        } else if (node instanceof BeanRef) {
-            BeanRef beanRef = (BeanRef) node;
+        } else if (node instanceof BeanDefinition) {
+            BeanDefinition beanRef = (BeanDefinition) node;
 
             // TODO
             //this.image = imagePrefix + "Bean.png";

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/view/RouteDotGenerator.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/view/RouteDotGenerator.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/view/RouteDotGenerator.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/view/RouteDotGenerator.java Sun Mar  8 02:14:07 2009
@@ -22,7 +22,7 @@
 import java.util.Set;
 
 import org.apache.camel.model.FromDefinition;
-import org.apache.camel.model.InterceptorRef;
+import org.apache.camel.model.InterceptorDefinition;
 import org.apache.camel.model.MulticastDefinition;
 import org.apache.camel.model.PipelineDefinition;
 import org.apache.camel.model.ProcessorDefinition;
@@ -95,7 +95,7 @@
 
     @SuppressWarnings("unchecked")
     protected NodeData printNode(PrintWriter writer, NodeData fromData, ProcessorDefinition node) {
-        if (node instanceof MulticastDefinition || node instanceof InterceptorRef) {
+        if (node instanceof MulticastDefinition || node instanceof InterceptorDefinition) {
             // no need for a multicast or interceptor node
             List<ProcessorDefinition> outputs = node.getOutputs();
             boolean isPipeline = isPipeline(node);

Modified: camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index (original)
+++ camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index Sun Mar  8 02:14:07 2009
@@ -14,16 +14,16 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ------------------------------------------------------------------------
-AggregatorDefinition
-BeanRef
+AggregateDefinition
+BeanDefinition
 CatchDefinition
 ChoiceDefinition
 ConvertBodyDefinition
-DelayerDefinition
+DelayDefinition
 DescriptionDefinition
-EnricherDefinition
-ExceptionDefinition
-ExpressionSubElementType
+EnrichDefinition
+OnExceptionDefinition
+ExpressionSubElementDefinition
 FilterDefinition
 FinallyDefinition
 FromDefinition
@@ -31,8 +31,8 @@
 IdempotentConsumerDefinition
 InOnlyDefinition
 InOutDefinition
+AbstractInterceptorDefinition
 InterceptorDefinition
-InterceptorRef
 InterceptDefinition
 LoadBalanceDefinition
 LoopDefinition
@@ -41,15 +41,15 @@
 OptionalIdentifiedType
 OtherwiseDefinition
 PipelineDefinition
-PolicyRef
+PolicyDefinition
 ProceedDefinition
-ProcessorRef
+ProcessDefinition
 RecipientListDefinition
 RedeliveryPolicyDefinition
 RemoveHeaderDefinition
 RemovePropertyDefinition
-ResequencerDefinition
-RouteBuilderRef
+ResequenceDefinition
+RouteBuilderDefinition
 RouteDefinition
 RoutesDefinition
 RoutingSlipDefinition
@@ -59,10 +59,10 @@
 SetOutHeaderDefinition
 SetPropertyDefinition
 SortDefinition
-SplitterDefinition
+SplitDefinition
 StopDefinition
 ThreadDefinition
-ThrottlerDefinition
+ThrottleDefinition
 ThrowFaultDefinition
 ToDefinition
 TransformDefinition

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java Sun Mar  8 02:14:07 2009
@@ -39,7 +39,7 @@
     public void testParseProcessorXml() throws Exception {
         RouteDefinition route = assertOneRoute("processor.xml");
         assertFrom(route, "seda:a");
-        ProcessorRef to = assertOneProcessorInstanceOf(ProcessorRef.class, route);
+        ProcessDefinition to = assertOneProcessorInstanceOf(ProcessDefinition.class, route);
         assertEquals("Processor ref", "myProcessor", to.getRef());
     }
 
@@ -195,7 +195,7 @@
         RouteDefinition route = assertOneRoute("splitter.xml");
         assertFrom(route, "seda:a");
 
-        SplitterDefinition splitter = assertOneProcessorInstanceOf(SplitterDefinition.class, route);
+        SplitDefinition splitter = assertOneProcessorInstanceOf(SplitDefinition.class, route);
         assertExpression(splitter.getExpression(), "xpath", "/foo/bar");
         assertChildTo("to", splitter, "seda:b");
     }
@@ -220,7 +220,7 @@
 
     public void testParseBatchResequencerXml() throws Exception {
         RouteDefinition route = assertOneRoute("resequencerBatch.xml");
-        ResequencerDefinition resequencer = assertOneProcessorInstanceOf(ResequencerDefinition.class, route);
+        ResequenceDefinition resequencer = assertOneProcessorInstanceOf(ResequenceDefinition.class, route);
         assertNull(resequencer.getStreamConfig());
         assertNotNull(resequencer.getBatchConfig());
         assertEquals(500, resequencer.getBatchConfig().getBatchSize());
@@ -229,7 +229,7 @@
 
     public void testParseStreamResequencerXml() throws Exception {
         RouteDefinition route = assertOneRoute("resequencerStream.xml");
-        ResequencerDefinition resequencer = assertOneProcessorInstanceOf(ResequencerDefinition.class, route);
+        ResequenceDefinition resequencer = assertOneProcessorInstanceOf(ResequenceDefinition.class, route);
         assertNotNull(resequencer.getStreamConfig());
         assertNull(resequencer.getBatchConfig());
         assertEquals(1000, resequencer.getStreamConfig().getCapacity());
@@ -306,12 +306,12 @@
         assertNotNull(rt);
 
         // Rely on the fact that reference ids are unique
-        List<InterceptorDefinition> interceptors = rt.getInterceptors();
+        List<AbstractInterceptorDefinition> interceptors = rt.getInterceptors();
         assertEquals("Interceptor count does not match", names.length, interceptors.size());
 
         Set<String> refs = new HashSet<String>();
-        for (InterceptorDefinition it : interceptors) {
-            InterceptorRef ir = assertIsInstanceOf(InterceptorRef.class, it);
+        for (AbstractInterceptorDefinition it : interceptors) {
+            InterceptorDefinition ir = assertIsInstanceOf(InterceptorDefinition.class, it);
             refs.add(ir.getRef());
         }
         for (String name : names) {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerSupportTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerSupportTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerSupportTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerSupportTest.java Sun Mar  8 02:14:07 2009
@@ -22,7 +22,7 @@
 import junit.framework.TestCase;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 
 public class ErrorHandlerSupportTest extends TestCase {
 
@@ -32,7 +32,7 @@
         exceptions.add(ParentException.class);
 
         ErrorHandlerSupport support = new ShuntErrorHandlerSupport();
-        support.addExceptionPolicy(new ExceptionDefinition(exceptions));
+        support.addExceptionPolicy(new OnExceptionDefinition(exceptions));
 
         assertEquals(ChildException.class, getExceptionPolicyFor(support, new ChildException(), 0));
         assertEquals(ParentException.class, getExceptionPolicyFor(support, new ParentException(), 1));
@@ -44,7 +44,7 @@
         exceptions.add(ChildException.class);
 
         ErrorHandlerSupport support = new ShuntErrorHandlerSupport();
-        support.addExceptionPolicy(new ExceptionDefinition(exceptions));
+        support.addExceptionPolicy(new OnExceptionDefinition(exceptions));
 
         assertEquals(ChildException.class, getExceptionPolicyFor(support, new ChildException(), 1));
         assertEquals(ParentException.class, getExceptionPolicyFor(support, new ParentException(), 0));
@@ -52,8 +52,8 @@
 
     public void testTwoPolicyChildFirst() {
         ErrorHandlerSupport support = new ShuntErrorHandlerSupport();
-        support.addExceptionPolicy(new ExceptionDefinition(ChildException.class));
-        support.addExceptionPolicy(new ExceptionDefinition(ParentException.class));
+        support.addExceptionPolicy(new OnExceptionDefinition(ChildException.class));
+        support.addExceptionPolicy(new OnExceptionDefinition(ParentException.class));
 
         assertEquals(ChildException.class, getExceptionPolicyFor(support, new ChildException(), 0));
         assertEquals(ParentException.class, getExceptionPolicyFor(support, new ParentException(), 0));
@@ -61,8 +61,8 @@
 
     public void testTwoPolicyChildLast() {
         ErrorHandlerSupport support = new ShuntErrorHandlerSupport();
-        support.addExceptionPolicy(new ExceptionDefinition(ParentException.class));
-        support.addExceptionPolicy(new ExceptionDefinition(ChildException.class));
+        support.addExceptionPolicy(new OnExceptionDefinition(ParentException.class));
+        support.addExceptionPolicy(new OnExceptionDefinition(ChildException.class));
 
         assertEquals(ChildException.class, getExceptionPolicyFor(support, new ChildException(), 0));
         assertEquals(ParentException.class, getExceptionPolicyFor(support, new ParentException(), 0));

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterWithCustomThreadPoolExecutorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterWithCustomThreadPoolExecutorTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterWithCustomThreadPoolExecutorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterWithCustomThreadPoolExecutorTest.java Sun Mar  8 02:14:07 2009
@@ -25,7 +25,7 @@
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.model.RouteDefinition;
-import org.apache.camel.model.SplitterDefinition;
+import org.apache.camel.model.SplitDefinition;
 
 public class SplitterWithCustomThreadPoolExecutorTest extends ContextTestSupport {
 
@@ -38,8 +38,8 @@
         assertTrue(threadPoolExecutor.getMaximumPoolSize() == customThreadPoolExecutor.getMaximumPoolSize());
     }
     
-    protected SplitterDefinition getSplitter() {
-        SplitterDefinition result = null;
+    protected SplitDefinition getSplitter() {
+        SplitDefinition result = null;
         List<RouteDefinition> routeDefinitions = context.getRouteDefinitions();          
         for (RouteDefinition routeType : routeDefinitions) {
             result = firstSplitterType(routeType.getOutputs());
@@ -50,12 +50,12 @@
         return result;
     }    
     
-    protected SplitterDefinition firstSplitterType(List<ProcessorDefinition> outputs) {
-        SplitterDefinition result = null;
+    protected SplitDefinition firstSplitterType(List<ProcessorDefinition> outputs) {
+        SplitDefinition result = null;
         
         for (ProcessorDefinition processorType : outputs) {
-            if (processorType instanceof SplitterDefinition) {
-                result = (SplitterDefinition) processorType;
+            if (processorType instanceof SplitDefinition) {
+                result = (SplitDefinition) processorType;
             } else {
                 result = firstSplitterType(processorType.getOutputs());
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/aggregator/AlbertoAggregatorTest.java Sun Mar  8 02:14:07 2009
@@ -28,7 +28,7 @@
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.model.AggregatorDefinition;
+import org.apache.camel.model.AggregateDefinition;
 import org.apache.camel.processor.aggregate.AggregationStrategy;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -183,7 +183,7 @@
                         constant(BROTHERS_TYPE)).to("direct:joinBrothers");
 
                 // Join all brothers lists and remove surname and type headers
-                AggregatorDefinition agg =
+                AggregateDefinition agg =
                         from("direct:joinBrothers").aggregate(header(TYPE_HEADER),
                                 brothersAggregator);
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/CustomExceptionPolicyStrategyTest.java Sun Mar  8 02:14:07 2009
@@ -25,7 +25,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 
 /**
  * Unit test with a user plugged in exception policy to use instead of default.
@@ -41,7 +41,7 @@
     // START SNIPPET e2
     public static class MyPolicy implements ExceptionPolicyStrategy {
 
-        public ExceptionDefinition getExceptionPolicy(Map<ExceptionPolicyKey, ExceptionDefinition> exceptionPolicices,
+        public OnExceptionDefinition getExceptionPolicy(Map<ExceptionPolicyKey, OnExceptionDefinition> exceptionPolicices,
                                                 Exchange exchange,
                                                 Throwable exception) {
             // This is just an example that always forces the exception type configured

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategyTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategyTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/exceptionpolicy/DefaultExceptionPolicyStrategyTest.java Sun Mar  8 02:14:07 2009
@@ -29,7 +29,7 @@
 import org.apache.camel.ExchangeTimedOutException;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.ValidationException;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 
 /**
  * Unit test for DefaultExceptionPolicy 
@@ -37,17 +37,17 @@
 public class DefaultExceptionPolicyStrategyTest extends TestCase {
 
     private DefaultExceptionPolicyStrategy strategy;
-    private HashMap<ExceptionPolicyKey, ExceptionDefinition> policies;
-    private ExceptionDefinition type1;
-    private ExceptionDefinition type2;
-    private ExceptionDefinition type3;
+    private HashMap<ExceptionPolicyKey, OnExceptionDefinition> policies;
+    private OnExceptionDefinition type1;
+    private OnExceptionDefinition type2;
+    private OnExceptionDefinition type3;
 
     private void setupPolicies() {
         strategy = new DefaultExceptionPolicyStrategy();
-        policies = new HashMap<ExceptionPolicyKey, ExceptionDefinition>();
-        type1 = new ExceptionDefinition(CamelExchangeException.class);
-        type2 = new ExceptionDefinition(Exception.class);
-        type3 = new ExceptionDefinition(IOException.class);
+        policies = new HashMap<ExceptionPolicyKey, OnExceptionDefinition>();
+        type1 = new OnExceptionDefinition(CamelExchangeException.class);
+        type2 = new OnExceptionDefinition(Exception.class);
+        type3 = new OnExceptionDefinition(IOException.class);
         policies.put(ExceptionPolicyKey.newInstance(CamelExchangeException.class), type1);
         policies.put(ExceptionPolicyKey.newInstance(Exception.class), type2);
         policies.put(ExceptionPolicyKey.newInstance(IOException.class), type3);
@@ -56,19 +56,19 @@
     private void setupPoliciesNoTopLevelException() {
         // without the top level exception that can be used as fallback
         strategy = new DefaultExceptionPolicyStrategy();
-        policies = new HashMap<ExceptionPolicyKey, ExceptionDefinition>();
-        type1 = new ExceptionDefinition(CamelExchangeException.class);
-        type3 = new ExceptionDefinition(IOException.class);
+        policies = new HashMap<ExceptionPolicyKey, OnExceptionDefinition>();
+        type1 = new OnExceptionDefinition(CamelExchangeException.class);
+        type3 = new OnExceptionDefinition(IOException.class);
         policies.put(ExceptionPolicyKey.newInstance(CamelExchangeException.class), type1);
         policies.put(ExceptionPolicyKey.newInstance(IOException.class), type3);
     }
 
     private void setupPoliciesCausedBy() {
         strategy = new DefaultExceptionPolicyStrategy();
-        policies = new HashMap<ExceptionPolicyKey, ExceptionDefinition>();
-        type1 = new ExceptionDefinition(FileNotFoundException.class);
-        type2 = new ExceptionDefinition(ConnectException.class);
-        type3 = new ExceptionDefinition(IOException.class);
+        policies = new HashMap<ExceptionPolicyKey, OnExceptionDefinition>();
+        type1 = new OnExceptionDefinition(FileNotFoundException.class);
+        type2 = new OnExceptionDefinition(ConnectException.class);
+        type3 = new OnExceptionDefinition(IOException.class);
         policies.put(ExceptionPolicyKey.newInstance(FileNotFoundException.class), type1);
         policies.put(ExceptionPolicyKey.newInstance(IOException.class), type2);
         policies.put(ExceptionPolicyKey.newInstance(ConnectException.class), type3);
@@ -76,25 +76,25 @@
 
     public void testDirectMatch1() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new CamelExchangeException("", null));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new CamelExchangeException("", null));
         assertEquals(type1, result);
     }
 
     public void testDirectMatch2() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new Exception(""));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new Exception(""));
         assertEquals(type2, result);
     }
 
     public void testDirectMatch3() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new IOException(""));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new IOException(""));
         assertEquals(type3, result);
     }
 
     public void testClosetMatch3() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ConnectException(""));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ConnectException(""));
         assertEquals(type3, result);
 
         result = strategy.getExceptionPolicy(policies, null, new SocketException(""));
@@ -106,7 +106,7 @@
 
     public void testClosetMatch2() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ClassCastException(""));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ClassCastException(""));
         assertEquals(type2, result);
 
         result = strategy.getExceptionPolicy(policies, null, new NumberFormatException(""));
@@ -118,7 +118,7 @@
 
     public void testClosetMatch1() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ValidationException(null, ""));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new ValidationException(null, ""));
         assertEquals(type1, result);
 
         result = strategy.getExceptionPolicy(policies, null, new ExchangeTimedOutException(null, 0));
@@ -127,13 +127,13 @@
 
     public void testNoMatch1ThenMatchingJustException() {
         setupPolicies();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new AlreadyStoppedException());
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new AlreadyStoppedException());
         assertEquals(type2, result);
     }
 
     public void testNoMatch1ThenNull() {
         setupPoliciesNoTopLevelException();
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new AlreadyStoppedException());
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new AlreadyStoppedException());
         assertNull("Should not find an exception policy to use", result);
     }
 
@@ -142,7 +142,7 @@
 
         IOException ioe = new IOException("Damm");
         ioe.initCause(new FileNotFoundException("Somefile not found"));
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, ioe);
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, ioe);
         assertEquals(type1, result);
     }
 
@@ -151,7 +151,7 @@
 
         IOException ioe = new IOException("Damm");
         ioe.initCause(new FileNotFoundException("Somefile not found"));
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new RuntimeCamelException(ioe));
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, new RuntimeCamelException(ioe));
         assertEquals(type1, result);
     }
 
@@ -160,7 +160,7 @@
 
         IOException ioe = new IOException("Damm");
         ioe.initCause(new ConnectException("Not connected"));
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, ioe);
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, ioe);
         assertEquals(type3, result);
     }
 
@@ -169,7 +169,7 @@
 
         IOException ioe = new IOException("Damm");
         ioe.initCause(new MalformedURLException("Bad url"));
-        ExceptionDefinition result = strategy.getExceptionPolicy(policies, null, ioe);
+        OnExceptionDefinition result = strategy.getExceptionPolicy(policies, null, ioe);
         assertEquals(type2, result);
     }
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/StreamCachingInterceptorTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/StreamCachingInterceptorTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/StreamCachingInterceptorTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/StreamCachingInterceptorTest.java Sun Mar  8 02:14:07 2009
@@ -32,8 +32,8 @@
 import org.apache.camel.converter.jaxp.BytesSource;
 import org.apache.camel.converter.jaxp.StringSource;
 import org.apache.camel.converter.jaxp.XmlConverter;
+import org.apache.camel.model.AbstractInterceptorDefinition;
 import org.apache.camel.model.InterceptorDefinition;
-import org.apache.camel.model.InterceptorRef;
 import org.apache.camel.processor.DelegateProcessor;
 
 public class StreamCachingInterceptorTest extends ContextTestSupport {
@@ -126,10 +126,10 @@
     }
 
     public void testNoStreamCaching() throws Exception {
-        List<InterceptorDefinition> interceptors = new LinkedList<InterceptorDefinition>();
-        InterceptorRef streamCache = new InterceptorRef(new StreamCachingInterceptor());
+        List<AbstractInterceptorDefinition> interceptors = new LinkedList<AbstractInterceptorDefinition>();
+        InterceptorDefinition streamCache = new InterceptorDefinition(new StreamCachingInterceptor());
         interceptors.add(streamCache);
-        interceptors.add(new InterceptorRef(new DelegateProcessor()));
+        interceptors.add(new InterceptorDefinition(new DelegateProcessor()));
         StreamCachingInterceptor.noStreamCaching(interceptors);
         assertEquals(1, interceptors.size());
         assertFalse(interceptors.contains(streamCache));

Modified: camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/converter/jaxb/MessageTypeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/converter/jaxb/MessageTypeTest.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/converter/jaxb/MessageTypeTest.java (original)
+++ camel/trunk/components/camel-jaxb/src/test/java/org/apache/camel/converter/jaxb/MessageTypeTest.java Sun Mar  8 02:14:07 2009
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.converter.jaxb;
-
-import java.io.StringWriter;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.Marshaller;
-
-import org.apache.camel.ExchangeTestSupport;
-
-/**
- * @version $Revision$
- */
-public class MessageTypeTest extends ExchangeTestSupport {
-    protected JAXBContext jaxbContext;
-
-    public void testCamelToJaxbUsingExplicitJaxbConverter() throws Exception {
-        MessageDefinition messageType = JaxbConverter.toMessageType(exchange);
-
-        assertNotNull("Should have created a valid message Type");
-
-        assertEquals("abc", messageType.getHeaderMap().get("foo"));
-        assertEquals(123, messageType.getHeaderMap().get("bar"));
-        assertEquals("<hello id='m123'>world!</hello>", messageType.getBody());
-        marshalMessage(messageType);
-    }
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        jaxbContext = JAXBContext.newInstance("org.apache.camel.converter.jaxb");
-    }
-
-    protected void marshalMessage(Object object) throws Exception {
-        Marshaller marshaller = jaxbContext.createMarshaller();
-        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
-        StringWriter buffer = new StringWriter();
-        marshaller.marshal(object, buffer);
-        String out = buffer.toString();
-        assertTrue("Should be XML", out.startsWith("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"));
-        assertTrue("Should containt string header", out.indexOf("<header value=\"abc\" name=\"foo\"/>") > -1);
-        assertTrue("Should containt int header", out.indexOf("<intHeader value=\"123\" name=\"bar\"/>") > -1);
-        assertTrue("Should containt the body", out.indexOf("&lt;hello id='m123'&gt;world!&lt;/hello&gt;") > -1);
-    }
-}

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java (original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java Sun Mar  8 02:14:07 2009
@@ -34,12 +34,12 @@
 import org.apache.camel.impl.DefaultLifecycleStrategy;
 import org.apache.camel.management.DefaultInstrumentationAgent;
 import org.apache.camel.management.InstrumentationLifecycleStrategy;
-import org.apache.camel.model.ExceptionDefinition;
+import org.apache.camel.model.OnExceptionDefinition;
 import org.apache.camel.model.IdentifiedType;
 import org.apache.camel.model.InterceptDefinition;
 import org.apache.camel.model.ProceedDefinition;
 import org.apache.camel.model.ProcessorDefinition;
-import org.apache.camel.model.RouteBuilderRef;
+import org.apache.camel.model.RouteBuilderDefinition;
 import org.apache.camel.model.RouteContainer;
 import org.apache.camel.model.RouteDefinition;
 import org.apache.camel.model.config.PropertiesDefinition;
@@ -102,14 +102,14 @@
         @XmlElement(name = "proxy", type = CamelProxyFactoryDefinition.class, required = false),
         @XmlElement(name = "export", type = CamelServiceExporterDefinition.class, required = false)})
     private List beans;    
-    @XmlElement(name = "routeBuilderRef", required = false)
-    private List<RouteBuilderRef> builderRefs = new ArrayList<RouteBuilderRef>();
+    @XmlElement(name = "routeBuilder", required = false)
+    private List<RouteBuilderDefinition> builderRefs = new ArrayList<RouteBuilderDefinition>();
     @XmlElement(name = "endpoint", required = false)
     private List<EndpointFactoryBean> endpoints;
     @XmlElement(name = "dataFormats", required = false)
     private DataFormatsDefinition dataFormats;
     @XmlElement(name = "onException", required = false)
-    private List<ExceptionDefinition> exceptionClauses = new ArrayList<ExceptionDefinition>();
+    private List<OnExceptionDefinition> exceptionClauses = new ArrayList<OnExceptionDefinition>();
     @XmlElement(name = "intercept", required = false)
     private List<InterceptDefinition> intercepts = new ArrayList<InterceptDefinition>();
     @XmlElement(name = "route", required = false)
@@ -220,7 +220,7 @@
                 List<ProcessorDefinition<?>> outputs = new ArrayList<ProcessorDefinition<?>>();
                 List<ProcessorDefinition<?>> exceptionHandlers = new ArrayList<ProcessorDefinition<?>>();
                 for (ProcessorDefinition output : route.getOutputs()) {
-                    if (output instanceof ExceptionDefinition) {
+                    if (output instanceof OnExceptionDefinition) {
                         exceptionHandlers.add(output);
                     } else {
                         outputs.add(output);
@@ -444,11 +444,11 @@
         return camelJMXAgent;
     }
 
-    public List<RouteBuilderRef> getBuilderRefs() {
+    public List<RouteBuilderDefinition> getBuilderRefs() {
         return builderRefs;
     }
 
-    public void setBuilderRefs(List<RouteBuilderRef> builderRefs) {
+    public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
         this.builderRefs = builderRefs;
     }
 
@@ -532,7 +532,7 @@
 
         // lets add route builders added from references
         if (builderRefs != null) {
-            for (RouteBuilderRef builderRef : builderRefs) {
+            for (RouteBuilderDefinition builderRef : builderRefs) {
                 RouteBuilder builder = builderRef.createRouteBuilder(getContext());
                 getContext().addRoutes(builder);
             }
@@ -559,11 +559,11 @@
         return dataFormats;
     }
 
-    public void setExceptionClauses(List<ExceptionDefinition> exceptionClauses) {
+    public void setExceptionClauses(List<OnExceptionDefinition> exceptionClauses) {
         this.exceptionClauses = exceptionClauses;
     }
 
-    public List<ExceptionDefinition> getExceptionClauses() {
+    public List<OnExceptionDefinition> getExceptionClauses() {
         return exceptionClauses;
     }
 }

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextRouteBuilderRef.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextRouteBuilderRef.xml?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextRouteBuilderRef.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextRouteBuilderRef.xml Sun Mar  8 02:14:07 2009
@@ -24,7 +24,7 @@
     
   <!-- START SNIPPET: example5 -->
   <camelContext id="camel5" xmlns="http://camel.apache.org/schema/spring">
-    <routeBuilderRef ref="myBuilder" />    
+    <routeBuilder ref="myBuilder" />    
   </camelContext>
   
   <bean id="myBuilder" class="org.apache.camel.spring.example.test1.MyRouteBuilder"/>

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/routeBuilderRef.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/routeBuilderRef.xml?rev=751357&r1=751356&r2=751357&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/routeBuilderRef.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/routeBuilderRef.xml Sun Mar  8 02:14:07 2009
@@ -26,7 +26,7 @@
 
   <!-- START SNIPPET: example5 -->
   <camelContext id="camel5" xmlns="http://camel.apache.org/schema/spring" autowireRouteBuilders="false">
-    <routeBuilderRef ref="configuredRouteBuilder"/>
+    <routeBuilder ref="configuredRouteBuilder"/>
   </camelContext>
   <!-- END SNIPPET: example5 -->
 



Mime
View raw message