You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Brossard <ar...@gmail.com> on 2015/11/25 15:23:04 UTC

Prevent FailedToCreateRouteException to cause application stop

Hi,

I am currently using Camel 2.16 in a web application, starting it with a
*ContextLoaderListener* in my *web.xml*.
Is there a way to prevent my webapp being stopped in case of exception like
*FailedToCreateRouteException* ?
In other words, i would like to isolate one (or more) route, and say to
Camel "it doesn't matters if this route doesn't starts up, i want to start
my application anyway".

Thanks for your help.

Regards,
Brossard



--
View this message in context: http://camel.465427.n5.nabble.com/Prevent-FailedToCreateRouteException-to-cause-application-stop-tp5774408.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Prevent FailedToCreateRouteException to cause application stop

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah the routes are prepared during startup so it depends what the problem is.

You can add the routes using the java api, using addRoutes if you want
to add them one by one, and ignore any problems.

Though it does smell that you have a system where you do not care if
some part of it do not work. Maybe split up your app so the "do not
care part" is separated from the "must work"



On Wed, Nov 25, 2015 at 3:58 PM, Brossard <ar...@gmail.com> wrote:
> Doesn't Camel try to resolve endpoint even if route isn't autostarted ?
> If not, how can i start my route(s) only when my application's context is
> started?
>
> Thx
> Arnaud
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Prevent-FailedToCreateRouteException-to-cause-application-stop-tp5774408p5774410.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: Prevent FailedToCreateRouteException to cause application stop

Posted by Brossard <ar...@gmail.com>.
Doesn't Camel try to resolve endpoint even if route isn't autostarted ?
If not, how can i start my route(s) only when my application's context is
started?

Thx
Arnaud



--
View this message in context: http://camel.465427.n5.nabble.com/Prevent-FailedToCreateRouteException-to-cause-application-stop-tp5774408p5774410.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Prevent FailedToCreateRouteException to cause application stop

Posted by Claus Ibsen <cl...@gmail.com>.
Mark all routes to not auto startup, and then start them yourself one
by one from some Java code etc.

On Wed, Nov 25, 2015 at 3:23 PM, Brossard <ar...@gmail.com> wrote:
> Hi,
>
> I am currently using Camel 2.16 in a web application, starting it with a
> *ContextLoaderListener* in my *web.xml*.
> Is there a way to prevent my webapp being stopped in case of exception like
> *FailedToCreateRouteException* ?
> In other words, i would like to isolate one (or more) route, and say to
> Camel "it doesn't matters if this route doesn't starts up, i want to start
> my application anyway".
>
> Thanks for your help.
>
> Regards,
> Brossard
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Prevent-FailedToCreateRouteException-to-cause-application-stop-tp5774408.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2