camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: Camel Context InterceptStrategy
Date Wed, 19 Jun 2013 11:20:19 GMT
Sounds strange... But to be honest, It sounds like a question for Claus,
Hadrian, ... ;-)

Best,

Christian Müller
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Wed, Jun 19, 2013 at 12:34 PM, Zhemzhitsky Sergey <
Sergey_Zhemzhitsky@sberbank-cib.ru> wrote:

> Hi Christian,
>
> Thanks for the link, I've already studied it.
>
> I've managed to apply intercept strategies at runtime to a newly
> registered CamelContext service with something like this
>
> camelCtx.addInterceptStrategy(interceptStrategy);
> for (RouteDefinition routeDef : camelCtx.getRouteDefinitions()) {
>     camelCtx.stopRoute(routeDef);
>     camelCtx.startRoute(routeDef);
> }
>
> The interesting thing is that CamelContext.startRoute(RouteDefinition)
> (which is deprecated now) applies the intercept strategies to the
> underlying routes and CamelContext.startRoute(String) - does not.
> Is this an expected behavior or the JIRA issue should be raised?
>
>
> Best Regards,
> Sergey
>
> -----Original Message-----
> From: Christian Müller [mailto:christian.mueller@gmail.com]
> Sent: Wednesday, June 19, 2013 2:29 AM
> To: users@camel.apache.org
> Subject: Re: Camel Context InterceptStrategy
>
> I guess you already studied http://camel.apache.org/intercept.html
>
> Best,
> Christian
>
> Sent from a mobile device
> Am 18.06.2013 12:45 schrieb "Zhemzhitsky Sergey" <
> Sergey_Zhemzhitsky@sberbank-cib.ru>:
>
> > Hello guys,
> >
> > I’d like to apply custom intercept strategy to a given camel context
> > running in an OSGi environment at runtime.
> > I’ve implemented osgi service-reference listener (blueprint) that is
> > notified when the camel context appears. When the listener is invoked
> > the intercept strategy is added to the camel context.
> > Unfortunately, for the InterceptStrategy to be applied it’s necessary
> > for the camel context to be restarted, but in OSGi environment
> > stopping camel context means unregistering corresponding OSGi service
> > and I’m not able to start is again.
> >
> > So, is there any way to apply intercept strategy to the camel context
> > without its restarting?
> >
> > Best Regards,
> > Sergey Zhemzhitsky
> >
> >
> > _______________________________________________________
> > CONFIDENTIALITY NOTICE: This email and any files attached to it may be
> > confidential. If you are not the intended recipient you are notified
> > that using, copying, distributing or taking any action in reliance on
> > the contents of this information is strictly prohibited. If you have
> > received this email in error please notify the sender and delete this
> email.
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message