You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by waterback <ma...@innoq.com> on 2010/11/09 10:44:02 UTC

Global? Errorhandler

Hi All,

i have a problem (maybe it's just me :-) understanding the meaning of the
word "global" that is used in the docs all around errorhandlers.

I would think that global would mean CamelContext-wide meaning of a defined
errorhandler. But from what i can see and observe with tests, that when i
define a errorhandler inside a Routebuilder it only works for the routes
defined in this routebuilder.

Can s.o. pls explain me how do i achieve such a thing as a global
errorhandler (do i have to define it in the spring-xml ?) or if this is not
a bug, but rather a feature, why it is called global?

Thank you very much for any insight!

btw.: in my project i use Camel 2.2

Martin

 - No Donkeys allowed here! - 


 
-- 
View this message in context: http://camel.465427.n5.nabble.com/Global-Errorhandler-tp3256521p3256521.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Global? Errorhandler

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah in the Java DSL the stuff you put in it are "global" for it. It
has been like that since Camel 1.0.

If you want to extend a base route etc. you can use regular Java for that.
For example a base abstract route with the "global" stuff.

And then extend that class and add your custom routes.

An alternative is to use includeRoute in the configure method where
you can refer and include other routes.
See for example RouteBuilderAddRoutesOnlyInterceptTest from the unit
test source code in camel-core


On Tue, Nov 9, 2010 at 10:44 AM, waterback <ma...@innoq.com> wrote:
>
> Hi All,
>
> i have a problem (maybe it's just me :-) understanding the meaning of the
> word "global" that is used in the docs all around errorhandlers.
>
> I would think that global would mean CamelContext-wide meaning of a defined
> errorhandler. But from what i can see and observe with tests, that when i
> define a errorhandler inside a Routebuilder it only works for the routes
> defined in this routebuilder.
>
> Can s.o. pls explain me how do i achieve such a thing as a global
> errorhandler (do i have to define it in the spring-xml ?) or if this is not
> a bug, but rather a feature, why it is called global?
>
> Thank you very much for any insight!
>
> btw.: in my project i use Camel 2.2
>
> Martin
>
>  - No Donkeys allowed here! -
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Global-Errorhandler-tp3256521p3256521.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



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