errorHandlerRef - camel route vs camel context

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

errorHandlerRef - camel route vs camel context

Charles Moulliard
Hi,

I would like to know if camel behavior is different when attribute
errorHandlerRef is defined at the level of camelContext instead of
camelRoute ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: errorHandlerRef - camel route vs camel context

Jon Anstey
Yeah, the scope of the error handler is different in those two cases. When
added to the camelContext, it applies to all routes in the context. When
applied to a single route, it only applies to that route.

On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard <[hidden email]>wrote:

> Hi,
>
> I would like to know if camel behavior is different when attribute
> errorHandlerRef is defined at the level of camelContext instead of
> camelRoute ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



--
Cheers,
Jon

http://janstey.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: errorHandlerRef - camel route vs camel context

Jon Anstey
I think I jumped the gun here... that was a bit obvious :) Charles, are you
noticing other differences in behavior?

On Tue, Aug 11, 2009 at 10:19 AM, Jon Anstey <[hidden email]> wrote:

> Yeah, the scope of the error handler is different in those two cases. When
> added to the camelContext, it applies to all routes in the context. When
> applied to a single route, it only applies to that route.
>
>
> On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard <[hidden email]>wrote:
>
>> Hi,
>>
>> I would like to know if camel behavior is different when attribute
>> errorHandlerRef is defined at the level of camelContext instead of
>> camelRoute ?
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>>
>
>
>
> --
> Cheers,
> Jon
>
> http://janstey.blogspot.com/
>



--
Cheers,
Jon

http://janstey.blogspot.com/
Reply | Threaded
Open this post in threaded view
|

Re: errorHandlerRef - camel route vs camel context

Charles Moulliard
Jon,

During my holidays my colleague has made tests on transacted routes of our
project. He noticed what he called some "unstabilities" in transaction
behavior. In consequence, he changed the route definition (removing direct
between routes and use queues, change propagation property for Spring
Transaction from required to required_new between routes) in order to solve
the problem.

From my understanding of camel, what he reports to me cannot be related to
the use of "direct" between routes but probably to potentially issues
existing between Hibernate/Spring. Nevertheless, I asked this question to
check if another parameters (used in transacted routes) could impact
transaction handling.

Question : If errorHandledRef reference used between the routes is the same,
it can be defined at the level of the context instead of each route ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com


On Tue, Aug 11, 2009 at 2:51 PM, Jon Anstey <[hidden email]> wrote:

> I think I jumped the gun here... that was a bit obvious :) Charles, are you
> noticing other differences in behavior?
>
> On Tue, Aug 11, 2009 at 10:19 AM, Jon Anstey <[hidden email]> wrote:
>
> > Yeah, the scope of the error handler is different in those two cases.
> When
> > added to the camelContext, it applies to all routes in the context. When
> > applied to a single route, it only applies to that route.
> >
> >
> > On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard <
> [hidden email]>wrote:
> >
> >> Hi,
> >>
> >> I would like to know if camel behavior is different when attribute
> >> errorHandlerRef is defined at the level of camelContext instead of
> >> camelRoute ?
> >>
> >> Regards,
> >>
> >> Charles Moulliard
> >> Senior Enterprise Architect
> >> Apache Camel Committer
> >>
> >> *****************************
> >> blog : http://cmoulliard.blogspot.com
> >>
> >
> >
> >
> > --
> > Cheers,
> > Jon
> >
> > http://janstey.blogspot.com/
> >
>
>
>
> --
> Cheers,
> Jon
>
> http://janstey.blogspot.com/
>
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: errorHandlerRef - camel route vs camel context

Jon Anstey
On Tue, Aug 11, 2009 at 10:42 AM, Charles Moulliard <[hidden email]>wrote:

> Jon,
>
> During my holidays my colleague has made tests on transacted routes of our
> project. He noticed what he called some "unstabilities" in transaction
> behavior. In consequence, he changed the route definition (removing direct
> between routes and use queues, change propagation property for Spring
> Transaction from required to required_new between routes) in order to solve
> the problem.
>
> From my understanding of camel, what he reports to me cannot be related to
> the use of "direct" between routes but probably to potentially issues
> existing between Hibernate/Spring. Nevertheless, I asked this question to
> check if another parameters (used in transacted routes) could impact
> transaction handling.


Yeah, from my understanding in order to avail of transactions you need to
use transaction enabled endpoints like JPA/JMS.


>
>
> Question : If errorHandledRef reference used between the routes is the
> same,
> it can be defined at the level of the context instead of each route ?


I haven't looked at the code but I would say yes. If this is not the case,
we probably need to fix it :)


>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>
>
> On Tue, Aug 11, 2009 at 2:51 PM, Jon Anstey <[hidden email]> wrote:
>
> > I think I jumped the gun here... that was a bit obvious :) Charles, are
> you
> > noticing other differences in behavior?
> >
> > On Tue, Aug 11, 2009 at 10:19 AM, Jon Anstey <[hidden email]> wrote:
> >
> > > Yeah, the scope of the error handler is different in those two cases.
> > When
> > > added to the camelContext, it applies to all routes in the context.
> When
> > > applied to a single route, it only applies to that route.
> > >
> > >
> > > On Tue, Aug 11, 2009 at 10:10 AM, Charles Moulliard <
> > [hidden email]>wrote:
> > >
> > >> Hi,
> > >>
> > >> I would like to know if camel behavior is different when attribute
> > >> errorHandlerRef is defined at the level of camelContext instead of
> > >> camelRoute ?
> > >>
> > >> Regards,
> > >>
> > >> Charles Moulliard
> > >> Senior Enterprise Architect
> > >> Apache Camel Committer
> > >>
> > >> *****************************
> > >> blog : http://cmoulliard.blogspot.com
> > >>
> > >
> > >
> > >
> > > --
> > > Cheers,
> > > Jon
> > >
> > > http://janstey.blogspot.com/
> > >
> >
> >
> >
> > --
> > Cheers,
> > Jon
> >
> > http://janstey.blogspot.com/
> >
>



--
Cheers,
Jon

http://janstey.blogspot.com/