[ 
https://issues.apache.org/jira/browse/CAMEL-12980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16739410#comment-16739410
 ] 

Claus Ibsen commented on CAMEL-12980:
-------------------------------------

In Gregors example then with autoStartup=false, we should just "see this" as a 
camel context with 0 routes. Its something the user explicit decided to not 
start the routes on startup. When he/she start them later, then errors may 
happen, just as it can happen later on if you start/stop routes at runtime etc. 
I think in this situation the bundle should still be active.

But in the normal use-case I also think that its ideal that the bundle becomes 
failed if CamelContext cannot fully startup and run successfully.


> Bundle in 'Active' State but Camel Context not initialized
> ----------------------------------------------------------
>
>                 Key: CAMEL-12980
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12980
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.20.1, 2.21.1
>            Reporter: Xilai Dai
>            Assignee: Grzegorz Grzybek
>            Priority: Critical
>             Fix For: 3.0.0, 2.24.0
>
>         Attachments: blueprint.xml
>
>
> The camel context can't get initialized when validation of the 
> RouteDefinition failed (e.g. typo in Uri or add an unsupported option in 
> Uri), but when deploy the blueprint, the CamelContext startup and then 
> shutdown, but the bundle status is still 'Active', only a 
> FailedToCreateRouteException ERROR is logged.
> 318 │ Active  │  80 │ 0.0.0                 │ blueprint.xml
> Attached the simple blueprint.xml for reproduce it.
> The expected behaviour is the bundle is in the 'Failure' status in this case.
> The fix proposal from my side is, move the call of "this.maybeStart()" from 
> blueprintEvent() method to the constructor of the BlueprintCamelContext 
> class. then this kind of Route definition error can be processed during the 
> Blueprint "CREATING" phase. Currently, the start() is invoked after Blueprint 
> in "CREATED" phase. (I tested this fix locally and have the expected 
> 'Failure' bundle status) 
> (This issue is found in Camel 2.20.x, 2.21.x, but it may affects also on 
> master branch)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to