[
https://issues.apache.org/jira/browse/CAMEL-4453?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Schneider resolved CAMEL-4453.
----------------------------------------
Resolution: Fixed
> Avoid reference from api to builder (ErrorHandlerBuilder) and clean up model
> in regard to error handler
> -------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-4453
> URL: https://issues.apache.org/jira/browse/CAMEL-4453
> Project: Camel
> Issue Type: Improvement
> Affects Versions: 2.8.0
> Reporter: Christian Schneider
> Fix For: 2.9.0
>
>
> Currently we have some lees than optimal designs in camel:
> The api and spi reference ErrorHandlerbuilder which is a builder level
> interface. As the builder needs access to almost anything this creates a big
> cycle over all of camel.
> We also use the ErrorHandlerBuilder in many places where no build is
> necessary. In these cases rather a factory is needed.
> The last thing is that we allow to change the ErrorHandlerBuilder in
> ProcessDefintion. So it can be set everywhere though it really should only be
> set on the start of a RouteDefinition.
> So I propose to change several things:
> - Create an interface ErrorHandlerFactory that only has the create method and
> use it instead of ErrorHandlerBuilder where no builder is needed
> - Remove ErrorHandlerBuilder in ProcessDefintion and only have it in
> RouteDefintion
> The first part should be made compatible using deprecation so people will not
> be affected.
> The second part is incompatible but I doubt many people use the errorhandler
> outside the start of a Route. So I think we need to compatiblity measures.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira