camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: svn commit: r1171054 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apache/camel/management/ camel-core
Date Thu, 15 Sep 2011 11:30:12 GMT
Hi Christian

Could you be a bit more careful when you do this bigger refactorings.
We have another compiler error on trunk.


[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project camel-spring: Compilation failure:
Compilation failure:
[ERROR] /Users/davsclaus/workspace/camel/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java:[86,38]
cannot find symbol
[ERROR] symbol  : method supportTransacted()
[ERROR] location: interface org.apache.camel.ErrorHandlerFactory

A good idea is to run a
     mvn clean install -Dtest=false
from the project root.


On Thu, Sep 15, 2011 at 1:05 PM,  <cschneider@apache.org> wrote:
> Author: cschneider
> Date: Thu Sep 15 11:05:03 2011
> New Revision: 1171054
>
> URL: http://svn.apache.org/viewvc?rev=1171054&view=rev
> Log:
> CAMEL-4453 Use ErrorHandlerFactory instead of Builder. Remove error handler from ProcessorDefinition and add it in RouteDefinition
>
> Added:
>    camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java
> Modified:
>    camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilderRef.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementObjectStrategy.java
>    camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java
>    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
>    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelUseOriginalInBodyTest.java
>    camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiServiceRegistry.java
>    camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
>    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/CamelContext.java Thu Sep 15 11:05:03 2011
> @@ -699,6 +699,7 @@ public interface CamelContext extends Su
>
>     /**
>      * Gets the default error handler builder which is inherited by the routes
> +     * @deprecated The return type will be switched to ErrorHandlerFactory in Camel 3.0
>      *
>      * @return the builder
>      */
> @@ -710,8 +711,7 @@ public interface CamelContext extends Su
>      *
>      * @param errorHandlerBuilder the builder
>      */
> -    @Deprecated
> -    void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder);
> +    void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder);
>
>     /**
>      * Sets the data formats that can be referenced in the routes.
>
> Added: camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java?rev=1171054&view=auto
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java (added)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java Thu Sep 15 11:05:03 2011
> @@ -0,0 +1,33 @@
> +/**
> + * 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;
> +
> +import org.apache.camel.spi.RouteContext;
> +
> +public interface ErrorHandlerFactory {
> +
> +    /**
> +     * Creates the error handler interceptor
> +     *
> +     * @param routeContext the route context
> +     * @param processor the outer processor
> +     * @return the error handler
> +     * @throws Exception is thrown if the error handler could not be created
> +     */
> +    Processor createErrorHandler(RouteContext routeContext, Processor processor) throws Exception;
> +
> +}
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilder.java Thu Sep 15 11:05:03 2011
> @@ -18,28 +18,17 @@ package org.apache.camel.builder;
>
>  import java.util.List;
>
> -import org.apache.camel.Processor;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.model.OnExceptionDefinition;
>  import org.apache.camel.processor.ErrorHandler;
>  import org.apache.camel.processor.exceptionpolicy.ExceptionPolicyStrategy;
> -import org.apache.camel.spi.RouteContext;
>
>  /**
>  * A builder of a <a href="http://camel.apache.org/error-handler.html">Error Handler</a>
>  *
>  * @version
>  */
> -public interface ErrorHandlerBuilder {
> -
> -    /**
> -     * Creates the error handler interceptor
> -     *
> -     * @param routeContext the route context
> -     * @param processor the outer processor
> -     * @return the error handler
> -     * @throws Exception is thrown if the error handler could not be created
> -     */
> -    Processor createErrorHandler(RouteContext routeContext, Processor processor) throws Exception;
> +public interface ErrorHandlerBuilder extends ErrorHandlerFactory {
>
>     /**
>      * Adds error handler for the given exception type
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilderRef.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilderRef.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilderRef.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ErrorHandlerBuilderRef.java Thu Sep 15 11:05:03 2011
> @@ -19,6 +19,7 @@ package org.apache.camel.builder;
>  import java.util.List;
>
>  import org.apache.camel.CamelContext;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.model.ModelCamelContext;
>  import org.apache.camel.model.OnExceptionDefinition;
> @@ -66,8 +67,8 @@ public class ErrorHandlerBuilderRef exte
>      * @param ref          reference id for the error handler
>      * @return the error handler
>      */
> -    public static ErrorHandlerBuilder lookupErrorHandlerBuilder(RouteContext routeContext, String ref) {
> -        ErrorHandlerBuilder answer;
> +    public static ErrorHandlerFactory lookupErrorHandlerBuilder(RouteContext routeContext, String ref) {
> +        ErrorHandlerFactory answer;
>
>         // if the ref is the default then we do not have any explicit error handler configured
>         // if that is the case then use error handlers configured on the route, as for instance
> @@ -98,7 +99,7 @@ public class ErrorHandlerBuilderRef exte
>                 }
>                 // inherit the error handlers from the other as they are to be shared
>                 // this is needed by camel-spring when none error handler has been explicit configured
> -                answer.setErrorHandlers(other.getErrorHandlers());
> +                ((ErrorHandlerBuilder)answer).setErrorHandlers(other.getErrorHandlers());
>             }
>         } else {
>             // use specific configured error handler
> @@ -111,8 +112,8 @@ public class ErrorHandlerBuilderRef exte
>         return answer;
>     }
>
> -    protected static ErrorHandlerBuilder lookupErrorHandlerBuilder(ModelCamelContext camelContext) {
> -        ErrorHandlerBuilder answer = camelContext.getErrorHandlerBuilder();
> +    protected static ErrorHandlerFactory lookupErrorHandlerBuilder(ModelCamelContext camelContext) {
> +        ErrorHandlerFactory answer = camelContext.getErrorHandlerBuilder();
>         if (answer instanceof ErrorHandlerBuilderRef) {
>             ErrorHandlerBuilderRef other = (ErrorHandlerBuilderRef) answer;
>             String otherRef = other.getRef();
> @@ -146,12 +147,12 @@ public class ErrorHandlerBuilderRef exte
>         return ref;
>     }
>
> -    public ErrorHandlerBuilder getHandler() {
> +    public ErrorHandlerFactory getHandler() {
>         return handler;
>     }
>
>     private ErrorHandlerBuilder createErrorHandler(RouteContext routeContext) {
> -        handler = lookupErrorHandlerBuilder(routeContext, getRef());
> +        handler = (ErrorHandlerBuilder)lookupErrorHandlerBuilder(routeContext, getRef());
>         ObjectHelper.notNull(handler, "error handler '" + ref + "'");
>
>         // configure if the handler support transacted
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Thu Sep 15 11:05:03 2011
> @@ -44,6 +44,7 @@ import org.apache.camel.Component;
>  import org.apache.camel.Consumer;
>  import org.apache.camel.ConsumerTemplate;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.FailedToStartRouteException;
>  import org.apache.camel.IsSingleton;
>  import org.apache.camel.MultipleConsumersSupport;
> @@ -172,7 +173,7 @@ public class DefaultCamelContext extends
>     private Boolean useMDCLogging = Boolean.FALSE;
>     private Boolean useBreadcrumb = Boolean.TRUE;
>     private Long delay;
> -    private ErrorHandlerBuilder errorHandlerBuilder;
> +    private ErrorHandlerFactory errorHandlerBuilder;
>     private Map<String, DataFormatDefinition> dataFormats = new HashMap<String, DataFormatDefinition>();
>     private DataFormatResolver dataFormatResolver = new DefaultDataFormatResolver();
>     private Map<String, String> properties = new HashMap<String, String>();
> @@ -1217,10 +1218,10 @@ public class DefaultCamelContext extends
>     }
>
>     public ErrorHandlerBuilder getErrorHandlerBuilder() {
> -        return errorHandlerBuilder;
> +        return (ErrorHandlerBuilder)errorHandlerBuilder;
>     }
>
> -    public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder) {
>         this.errorHandlerBuilder = errorHandlerBuilder;
>     }
>
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultRouteContext.java Thu Sep 15 11:05:03 2011
> @@ -102,10 +102,6 @@ public class DefaultRouteContext impleme
>         return camelContext;
>     }
>
> -    public Processor createProcessor(ProcessorDefinition<?> node) throws Exception {
> -        return node.createOutputsProcessor(this);
> -    }
> -
>     public Endpoint resolveEndpoint(String uri) {
>         return route.resolveEndpoint(getCamelContext(), uri);
>     }
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java Thu Sep 15 11:05:03 2011
> @@ -34,6 +34,7 @@ import org.apache.camel.Channel;
>  import org.apache.camel.Component;
>  import org.apache.camel.Consumer;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.ManagementStatisticsLevel;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Producer;
> @@ -41,7 +42,6 @@ import org.apache.camel.Route;
>  import org.apache.camel.Service;
>  import org.apache.camel.VetoCamelContextStartException;
>  import org.apache.camel.api.management.PerformanceCounter;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.impl.ConsumerCache;
>  import org.apache.camel.impl.DefaultCamelContextNameStrategy;
>  import org.apache.camel.impl.EndpointRegistry;
> @@ -520,7 +520,7 @@ public class DefaultManagementLifecycleS
>         }
>     }
>
> -    public void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder) {
>         if (!shouldRegister(errorHandler, null)) {
>             // avoid registering if not needed
>             return;
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java Thu Sep 15 11:05:03 2011
> @@ -25,11 +25,11 @@ import org.apache.camel.CamelContext;
>  import org.apache.camel.Component;
>  import org.apache.camel.Consumer;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Producer;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.builder.ErrorHandlerBuilderRef;
>  import org.apache.camel.model.ProcessorDefinition;
>  import org.apache.camel.spi.EventNotifier;
> @@ -123,7 +123,7 @@ public class DefaultManagementNamingStra
>         return createObjectName(buffer);
>     }
>
> -    public ObjectName getObjectNameForErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder builder) throws MalformedObjectNameException {
> +    public ObjectName getObjectNameForErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory builder) throws MalformedObjectNameException {
>         StringBuilder buffer = new StringBuilder();
>         buffer.append(domainName + ":" + KEY_CONTEXT + "=" + getContextId(routeContext.getCamelContext()) + ","
>                       + KEY_TYPE + "=" +  TYPE_ERRORHANDLER + ",");
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java Thu Sep 15 11:05:03 2011
> @@ -23,11 +23,11 @@ import org.apache.camel.Component;
>  import org.apache.camel.Consumer;
>  import org.apache.camel.DelegateProcessor;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Producer;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.component.bean.BeanProcessor;
>  import org.apache.camel.impl.ScheduledPollConsumer;
>  import org.apache.camel.management.mbean.ManagedBeanProcessor;
> @@ -102,7 +102,7 @@ public class DefaultManagementObjectStra
>     }
>
>     public Object getManagedObjectForErrorHandler(CamelContext context, RouteContext routeContext,
> -                                                  Processor errorHandler, ErrorHandlerBuilder errorHandlerBuilder) {
> +                                                  Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder) {
>         ManagedErrorHandler me = new ManagedErrorHandler(routeContext, errorHandler, errorHandlerBuilder);
>         me.init(context.getManagementStrategy());
>         return me;
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedErrorHandler.java Thu Sep 15 11:05:03 2011
> @@ -16,11 +16,11 @@
>  */
>  package org.apache.camel.management.mbean;
>
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.LoggingLevel;
>  import org.apache.camel.Processor;
>  import org.apache.camel.api.management.ManagedAttribute;
>  import org.apache.camel.api.management.ManagedResource;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.processor.ErrorHandlerSupport;
>  import org.apache.camel.processor.RedeliveryErrorHandler;
>  import org.apache.camel.spi.ManagementStrategy;
> @@ -33,9 +33,9 @@ import org.apache.camel.spi.RouteContext
>  public class ManagedErrorHandler {
>     private final RouteContext routeContext;
>     private final Processor errorHandler;
> -    private final ErrorHandlerBuilder errorHandlerBuilder;
> +    private final ErrorHandlerFactory errorHandlerBuilder;
>
> -    public ManagedErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder builder) {
> +    public ManagedErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory builder) {
>         this.routeContext = routeContext;
>         this.errorHandler = errorHandler;
>         this.errorHandlerBuilder = builder;
> @@ -53,7 +53,7 @@ public class ManagedErrorHandler {
>         return errorHandler;
>     }
>
> -    public ErrorHandlerBuilder getErrorHandlerBuilder() {
> +    public ErrorHandlerFactory getErrorHandlerBuilder() {
>         return errorHandlerBuilder;
>     }
>
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ModelCamelContext.java Thu Sep 15 11:05:03 2011
> @@ -22,26 +22,12 @@ import java.util.List;
>  import java.util.Map;
>
>  import org.apache.camel.CamelContext;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>
>  /**
>  * Model level interface for a camel context
>  *
>  */
>  public interface ModelCamelContext extends CamelContext {
> -    /**
> -     * Gets the default error handler builder which is inherited by the routes
> -     *
> -     * @return the builder
> -     */
> -    ErrorHandlerBuilder getErrorHandlerBuilder();
> -
> -    /**
> -     * Sets the default error handler builder which is inherited by the routes
> -     *
> -     * @param errorHandlerBuilder the builder
> -     */
> -    void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder);
>
>     /**
>      * Returns a list of the current route definitions
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java Thu Sep 15 11:05:03 2011
> @@ -179,7 +179,7 @@ public class OnExceptionDefinition exten
>         validateConfiguration();
>
>         // lets attach this on exception to the route error handler
> -        Processor child = routeContext.createProcessor(this);
> +        Processor child = createOutputsProcessor(routeContext);
>         if (child != null) {
>             // wrap in our special safe fallback error handler if OnException have child output
>             errorHandler = new FatalFallbackErrorHandler(child);
> @@ -188,7 +188,7 @@ public class OnExceptionDefinition exten
>             errorHandler = null;
>         }
>         // lookup the error handler builder
> -        ErrorHandlerBuilder builder = routeContext.getRoute().getErrorHandlerBuilder();
> +        ErrorHandlerBuilder builder = (ErrorHandlerBuilder)routeContext.getRoute().getErrorHandlerBuilder();
>         // and add this as error handlers
>         builder.addErrorHandlers(this);
>     }
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Thu Sep 15 11:05:03 2011
> @@ -36,6 +36,7 @@ import javax.xml.namespace.QName;
>
>  import org.apache.camel.Channel;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Exchange;
>  import org.apache.camel.ExchangePattern;
>  import org.apache.camel.Expression;
> @@ -44,8 +45,6 @@ import org.apache.camel.Predicate;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Route;
>  import org.apache.camel.builder.DataFormatClause;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
> -import org.apache.camel.builder.ErrorHandlerBuilderRef;
>  import org.apache.camel.builder.ExpressionBuilder;
>  import org.apache.camel.builder.ExpressionClause;
>  import org.apache.camel.builder.ProcessorBuilder;
> @@ -81,8 +80,6 @@ import org.slf4j.LoggerFactory;
>  @XmlAccessorType(XmlAccessType.PROPERTY)
>  public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>> extends OptionalIdentifiedDefinition implements Block {
>     protected final transient Logger log = LoggerFactory.getLogger(getClass());
> -    protected ErrorHandlerBuilder errorHandlerBuilder;
> -    protected String errorHandlerRef;
>     protected Boolean inheritErrorHandler;
>     private NodeFactory nodeFactory;
>     private final LinkedList<Block> blocks = new LinkedList<Block>();
> @@ -150,7 +147,7 @@ public abstract class ProcessorDefinitio
>         }
>         // fallback to default implementation if factory did not create the child
>         if (children == null) {
> -            children = routeContext.createProcessor(this);
> +            children = createOutputsProcessor(routeContext);
>         }
>
>         if (children == null && mandatory) {
> @@ -169,7 +166,6 @@ public abstract class ProcessorDefinitio
>
>         output.setParent(this);
>         output.setNodeFactory(getNodeFactory());
> -        output.setErrorHandlerBuilder(getErrorHandlerBuilder());
>         configureChild(output);
>         getOutputs().add(output);
>     }
> @@ -294,7 +290,7 @@ public abstract class ProcessorDefinitio
>         if (isInheritErrorHandler() == null || isInheritErrorHandler()) {
>             log.trace("{} is configured to inheritErrorHandler", this);
>             Processor output = channel.getOutput();
> -            Processor errorHandler = wrapInErrorHandler(routeContext, getErrorHandlerBuilder(), output);
> +            Processor errorHandler = wrapInErrorHandler(routeContext, output);
>             // set error handler on channel
>             channel.setErrorHandler(errorHandler);
>         } else {
> @@ -310,7 +306,8 @@ public abstract class ProcessorDefinitio
>      * @return the output wrapped with the error handler
>      * @throws Exception can be thrown if failed to create error handler builder
>      */
> -    protected Processor wrapInErrorHandler(RouteContext routeContext, ErrorHandlerBuilder builder, Processor output) throws Exception {
> +    protected Processor wrapInErrorHandler(RouteContext routeContext, Processor output) throws Exception {
> +        ErrorHandlerFactory builder = routeContext.getRoute().getErrorHandlerBuilder();
>         // create error handler
>         Processor errorHandler = builder.createErrorHandler(routeContext, output);
>
> @@ -559,15 +556,6 @@ public abstract class ProcessorDefinitio
>         }
>     }
>
> -    protected ErrorHandlerBuilder createErrorHandlerBuilder() {
> -        if (errorHandlerRef != null) {
> -            return new ErrorHandlerBuilderRef(errorHandlerRef);
> -        }
> -
> -        // return a reference to the default error handler
> -        return new ErrorHandlerBuilderRef(ErrorHandlerBuilderRef.DEFAULT_ERROR_HANDLER_BUILDER);
> -    }
> -
>     /**
>      * Strategy for children to do any custom configuration
>      *
> @@ -3063,21 +3051,6 @@ public abstract class ProcessorDefinitio
>     }
>
>     @XmlTransient
> -    public ErrorHandlerBuilder getErrorHandlerBuilder() {
> -        if (errorHandlerBuilder == null) {
> -            errorHandlerBuilder = createErrorHandlerBuilder();
> -        }
> -        return errorHandlerBuilder;
> -    }
> -
> -    /**
> -     * Sets the error handler to use with processors created by this builder
> -     */
> -    public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder) {
> -        this.errorHandlerBuilder = errorHandlerBuilder;
> -    }
> -
> -    @XmlTransient
>     public NodeFactory getNodeFactory() {
>         if (nodeFactory == null) {
>             nodeFactory = new NodeFactory();
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java Thu Sep 15 11:05:03 2011
> @@ -31,6 +31,7 @@ import javax.xml.bind.annotation.XmlType
>
>  import org.apache.camel.CamelContext;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.FailedToCreateRouteException;
>  import org.apache.camel.NoSuchEndpointException;
>  import org.apache.camel.Route;
> @@ -39,7 +40,6 @@ import org.apache.camel.ShutdownRoute;
>  import org.apache.camel.ShutdownRunningTask;
>  import org.apache.camel.builder.AdviceWithRouteBuilder;
>  import org.apache.camel.builder.AdviceWithTask;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.builder.ErrorHandlerBuilderRef;
>  import org.apache.camel.builder.RouteBuilder;
>  import org.apache.camel.impl.DefaultRouteContext;
> @@ -75,6 +75,8 @@ public class RouteDefinition extends Pro
>     private String routePolicyRef;
>     private ShutdownRoute shutdownRoute;
>     private ShutdownRunningTask shutdownRunningTask;
> +    private String errorHandlerRef;
> +    private ErrorHandlerFactory errorHandlerBuilder;
>
>     public RouteDefinition() {
>     }
> @@ -154,7 +156,7 @@ public class RouteDefinition extends Pro
>     public List<RouteContext> addRoutes(ModelCamelContext camelContext, Collection<Route> routes) throws Exception {
>         List<RouteContext> answer = new ArrayList<RouteContext>();
>
> -        ErrorHandlerBuilder handler = camelContext.getErrorHandlerBuilder();
> +        ErrorHandlerFactory handler = camelContext.getErrorHandlerBuilder();
>         if (handler != null) {
>             setErrorHandlerBuilderIfNull(handler);
>         }
> @@ -431,7 +433,7 @@ public class RouteDefinition extends Pro
>      * @param errorHandlerBuilder the error handler to be used by default for all child routes
>      * @return the current builder with the error handler configured
>      */
> -    public RouteDefinition errorHandler(ErrorHandlerBuilder errorHandlerBuilder) {
> +    public RouteDefinition errorHandler(ErrorHandlerFactory errorHandlerBuilder) {
>         setErrorHandlerBuilder(errorHandlerBuilder);
>         return this;
>     }
> @@ -659,7 +661,7 @@ public class RouteDefinition extends Pro
>     /**
>      * Sets the error handler if one is not already set
>      */
> -    public void setErrorHandlerBuilderIfNull(ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void setErrorHandlerBuilderIfNull(ErrorHandlerFactory errorHandlerBuilder) {
>         if (this.errorHandlerBuilder == null) {
>             setErrorHandlerBuilder(errorHandlerBuilder);
>         }
> @@ -700,6 +702,32 @@ public class RouteDefinition extends Pro
>     public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask) {
>         this.shutdownRunningTask = shutdownRunningTask;
>     }
> +
> +    private ErrorHandlerFactory createErrorHandlerBuilder() {
> +        if (errorHandlerRef != null) {
> +            return new ErrorHandlerBuilderRef(errorHandlerRef);
> +        }
> +
> +        // return a reference to the default error handler
> +        return new ErrorHandlerBuilderRef(ErrorHandlerBuilderRef.DEFAULT_ERROR_HANDLER_BUILDER);
> +    }
> +
> +
> +    @XmlTransient
> +    public ErrorHandlerFactory getErrorHandlerBuilder() {
> +        if (errorHandlerBuilder == null) {
> +            errorHandlerBuilder = createErrorHandlerBuilder();
> +        }
> +        return errorHandlerBuilder;
> +    }
> +
> +    /**
> +     * Sets the error handler to use with processors created by this builder
> +     */
> +    public void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder) {
> +        this.errorHandlerBuilder = errorHandlerBuilder;
> +    }
> +
>
>     // Implementation methods
>     // -------------------------------------------------------------------------
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java Thu Sep 15 11:05:03 2011
> @@ -20,7 +20,7 @@ import java.util.ArrayList;
>  import java.util.List;
>
>  import org.apache.camel.CamelContext;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.util.CamelContextHelper;
>  import org.apache.camel.util.EndpointHelper;
>  import org.apache.camel.util.ObjectHelper;
> @@ -49,14 +49,13 @@ public final class RouteDefinitionHelper
>     }
>
>     @SuppressWarnings("unchecked")
> -    public static void initParentAndErrorHandlerBuilder(ProcessorDefinition parent, ErrorHandlerBuilder builder) {
> +    private static void initParentAndErrorHandlerBuilder(ProcessorDefinition parent) {
>         List<ProcessorDefinition> children = parent.getOutputs();
>         for (ProcessorDefinition child : children) {
>             child.setParent(parent);
> -            child.setErrorHandlerBuilder(builder);
>             if (child.getOutputs() != null && !child.getOutputs().isEmpty()) {
>                 // recursive the children
> -                initParentAndErrorHandlerBuilder(child, builder);
> +                initParentAndErrorHandlerBuilder(child);
>             }
>         }
>     }
> @@ -168,13 +167,13 @@ public final class RouteDefinitionHelper
>         }
>
>         // init parent and error handler builder on the route
> -        initParentAndErrorHandlerBuilder(route, route.getErrorHandlerBuilder());
> +        initParentAndErrorHandlerBuilder(route);
>
>         // set the parent and error handler builder on the global on exceptions
>         if (onExceptions != null) {
>             for (OnExceptionDefinition global : onExceptions) {
> -                global.setErrorHandlerBuilder(context.getErrorHandlerBuilder());
> -                initParentAndErrorHandlerBuilder(global, context.getErrorHandlerBuilder());
> +                //global.setErrorHandlerBuilder(context.getErrorHandlerBuilder());
> +                initParentAndErrorHandlerBuilder(global);
>             }
>         }
>     }
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java Thu Sep 15 11:05:03 2011
> @@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlRoot
>  import javax.xml.bind.annotation.XmlTransient;
>
>  import org.apache.camel.Endpoint;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
> +import org.apache.camel.ErrorHandlerFactory;
>
>  /**
>  * Represents a collection of routes
> @@ -50,7 +50,7 @@ public class RoutesDefinition extends Op
>     @XmlTransient
>     private ModelCamelContext camelContext;
>     @XmlTransient
> -    private ErrorHandlerBuilder errorHandlerBuilder;
> +    private ErrorHandlerFactory errorHandlerBuilder;
>
>     public RoutesDefinition() {
>     }
> @@ -123,11 +123,11 @@ public class RoutesDefinition extends Op
>         this.camelContext = camelContext;
>     }
>
> -    public ErrorHandlerBuilder getErrorHandlerBuilder() {
> +    public ErrorHandlerFactory getErrorHandlerBuilder() {
>         return errorHandlerBuilder;
>     }
>
> -    public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder) {
>         this.errorHandlerBuilder = errorHandlerBuilder;
>     }
>
> @@ -285,7 +285,7 @@ public class RoutesDefinition extends Op
>     //-------------------------------------------------------------------------
>     protected RouteDefinition createRoute() {
>         RouteDefinition route = new RouteDefinition();
> -        ErrorHandlerBuilder handler = getErrorHandlerBuilder();
> +        ErrorHandlerFactory handler = getErrorHandlerBuilder();
>         if (handler != null) {
>             route.setErrorHandlerBuilderIfNull(handler);
>         }
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java Thu Sep 15 11:05:03 2011
> @@ -40,11 +40,11 @@ import org.apache.camel.AsyncProcessor;
>  import org.apache.camel.CamelContext;
>  import org.apache.camel.CamelExchangeException;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Exchange;
>  import org.apache.camel.Navigate;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Producer;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.processor.aggregate.AggregationStrategy;
>  import org.apache.camel.processor.aggregate.TimeoutAwareAggregationStrategy;
>  import org.apache.camel.spi.RouteContext;
> @@ -852,7 +852,7 @@ public class MulticastProcessor extends
>             }
>
>             LOG.trace("Creating error handler for: {}", processor);
> -            ErrorHandlerBuilder builder = routeContext.getRoute().getErrorHandlerBuilder();
> +            ErrorHandlerFactory builder = routeContext.getRoute().getErrorHandlerBuilder();
>             // create error handler (create error handler directly to keep it light weight,
>             // instead of using ProcessorDefinition.wrapInErrorHandler)
>             try {
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java Thu Sep 15 11:05:03 2011
> @@ -22,11 +22,11 @@ import java.util.concurrent.ThreadPoolEx
>  import org.apache.camel.CamelContext;
>  import org.apache.camel.Component;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
>  import org.apache.camel.VetoCamelContextStartException;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>
>  /**
>  * Strategy for lifecycle notifications.
> @@ -125,7 +125,7 @@ public interface LifecycleStrategy {
>      * @param errorHandler        the error handler
>      * @param errorHandlerBuilder the error handler builder
>      */
> -    void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder errorHandlerBuilder);
> +    void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder);
>
>     /**
>      * Notification on adding a thread pool.
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java Thu Sep 15 11:05:03 2011
> @@ -24,11 +24,11 @@ import org.apache.camel.CamelContext;
>  import org.apache.camel.Component;
>  import org.apache.camel.Consumer;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Producer;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.model.ProcessorDefinition;
>
>  /**
> @@ -46,7 +46,7 @@ public interface ManagementNamingStrateg
>
>     ObjectName getObjectNameForEndpoint(Endpoint endpoint) throws MalformedObjectNameException;
>
> -    ObjectName getObjectNameForErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder builder) throws MalformedObjectNameException;
> +    ObjectName getObjectNameForErrorHandler(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory builder) throws MalformedObjectNameException;
>
>     ObjectName getObjectNameForProcessor(CamelContext context, Processor processor, ProcessorDefinition<?> definition) throws MalformedObjectNameException;
>
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementObjectStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementObjectStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementObjectStrategy.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/ManagementObjectStrategy.java Thu Sep 15 11:05:03 2011
> @@ -22,11 +22,11 @@ import org.apache.camel.CamelContext;
>  import org.apache.camel.Component;
>  import org.apache.camel.Consumer;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Producer;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.model.ProcessorDefinition;
>
>  /**
> @@ -41,7 +41,7 @@ public interface ManagementObjectStrateg
>     Object getManagedObjectForEndpoint(CamelContext context, Endpoint endpoint);
>
>     Object getManagedObjectForErrorHandler(CamelContext context, RouteContext routeContext,
> -                                           Processor errorHandler, ErrorHandlerBuilder errorHandlerBuilder);
> +                                           Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder);
>
>     Object getManagedObjectForRoute(CamelContext context, Route route);
>
>
> Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java (original)
> +++ camel/trunk/camel-core/src/main/java/org/apache/camel/spi/RouteContext.java Thu Sep 15 11:05:03 2011
> @@ -63,15 +63,6 @@ public interface RouteContext extends Ru
>     CamelContext getCamelContext();
>
>     /**
> -     * Creates a processor
> -     *
> -     * @param node  the node
> -     * @return the created processor
> -     * @throws Exception can be thrown
> -     */
> -    Processor createProcessor(ProcessorDefinition<?> node) throws Exception;
> -
> -    /**
>      * Resolves an endpoint from the URI
>      *
>      * @param uri the URI
>
> Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java (original)
> +++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java Thu Sep 15 11:05:03 2011
> @@ -24,10 +24,10 @@ import java.util.concurrent.ThreadPoolEx
>  import org.apache.camel.CamelContext;
>  import org.apache.camel.Component;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.spi.LifecycleStrategy;
>  import org.apache.camel.spi.RouteContext;
>
> @@ -82,7 +82,7 @@ public class DummyLifecycleStrategy impl
>         events.add("onRouteContextCreate");
>     }
>
> -    public void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void onErrorHandlerAdd(RouteContext routeContext, Processor errorHandler, ErrorHandlerFactory errorHandlerBuilder) {
>         events.add("onErrorHandlerAdd");
>     }
>
>
> Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelUseOriginalInBodyTest.java
> URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelUseOriginalInBodyTest.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelUseOriginalInBodyTest.java (original)
> +++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelUseOriginalInBodyTest.java Thu Sep 15 11:05:03 2011
> @@ -17,9 +17,9 @@
>  package org.apache.camel.processor;
>
>  import org.apache.camel.ContextTestSupport;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Exchange;
>  import org.apache.camel.Processor;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.builder.RouteBuilder;
>  import org.apache.camel.component.mock.MockEndpoint;
>
> @@ -54,11 +54,11 @@ public class DeadLetterChannelUseOrigina
>             @Override
>             public void configure() throws Exception {
>                 // will use original
> -                ErrorHandlerBuilder a = deadLetterChannel("mock:a")
> +                ErrorHandlerFactory a = deadLetterChannel("mock:a")
>                     .maximumRedeliveries(2).redeliveryDelay(0).logStackTrace(false).useOriginalMessage();
>
>                 // will NOT use original
> -                ErrorHandlerBuilder b = deadLetterChannel("mock:b")
> +                ErrorHandlerFactory b = deadLetterChannel("mock:b")
>                     .maximumRedeliveries(2).redeliveryDelay(0).logStackTrace(false);
>
>                 from("direct:a")
>
> Modified: camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiServiceRegistry.java
> URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiServiceRegistry.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiServiceRegistry.java (original)
> +++ camel/trunk/components/camel-core-osgi/src/main/java/org/apache/camel/core/osgi/OsgiServiceRegistry.java Thu Sep 15 11:05:03 2011
> @@ -26,10 +26,10 @@ import java.util.concurrent.ThreadPoolEx
>  import org.apache.camel.CamelContext;
>  import org.apache.camel.Component;
>  import org.apache.camel.Endpoint;
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.Route;
>  import org.apache.camel.Service;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.spi.LifecycleStrategy;
>  import org.apache.camel.spi.Registry;
>  import org.apache.camel.spi.RouteContext;
> @@ -127,7 +127,7 @@ public class OsgiServiceRegistry impleme
>         // noop
>     }
>
> -    public void onErrorHandlerAdd(RouteContext routeContext, Processor processor, ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void onErrorHandlerAdd(RouteContext routeContext, Processor processor, ErrorHandlerFactory errorHandlerBuilder) {
>         // noop
>     }
>
>
> Modified: camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java
> URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java (original)
> +++ camel/trunk/components/camel-guice/src/main/java/org/apache/camel/guice/GuiceCamelContext.java Thu Sep 15 11:05:03 2011
> @@ -27,10 +27,10 @@ import javax.naming.InitialContext;
>  import com.google.inject.Binding;
>  import com.google.inject.Inject;
>
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.RoutesBuilder;
>  import org.apache.camel.RuntimeCamelException;
>  import org.apache.camel.TypeConverter;
> -import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.guice.impl.GuiceInjector;
>  import org.apache.camel.impl.DefaultCamelContext;
>  import org.apache.camel.impl.JndiRegistry;
> @@ -109,7 +109,7 @@ public class GuiceCamelContext extends D
>
>     @Override
>     @Inject(optional = true)
> -    public void setErrorHandlerBuilder(ErrorHandlerBuilder errorHandlerBuilder) {
> +    public void setErrorHandlerBuilder(ErrorHandlerFactory errorHandlerBuilder) {
>         super.setErrorHandlerBuilder(errorHandlerBuilder);
>     }
>
>
> Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
> URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java?rev=1171054&r1=1171053&r2=1171054&view=diff
> ==============================================================================
> --- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java (original)
> +++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java Thu Sep 15 11:05:03 2011
> @@ -16,6 +16,7 @@
>  */
>  package org.apache.camel.spring.spi;
>
> +import org.apache.camel.ErrorHandlerFactory;
>  import org.apache.camel.Processor;
>  import org.apache.camel.builder.ErrorHandlerBuilder;
>  import org.apache.camel.builder.ErrorHandlerBuilderRef;
> @@ -66,7 +67,7 @@ public class SpringTransactionPolicy imp
>         // if we should not support this we do not need to wrap the processor as we only need one transacted error handler
>
>         // find the existing error handler builder
> -        ErrorHandlerBuilder builder = routeContext.getRoute().getErrorHandlerBuilder();
> +        ErrorHandlerFactory builder = routeContext.getRoute().getErrorHandlerBuilder();
>
>         // check if its a ref if so then do a lookup
>         if (builder instanceof ErrorHandlerBuilderRef) {
>
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message