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

ASF GitHub Bot commented on CAMEL-10411:
----------------------------------------

GitHub user paoloantinori opened a pull request:

    https://github.com/apache/camel/pull/1221

    CAMEL-10411 - camel-blueprint. prevent automated restart in case of e…

    …rrors

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paoloantinori/camel bp_issue

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/1221.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1221
    
----
commit bf8d0de57b303e3e8b137e21ac96162a9b1fb921
Author: Paolo Antinori <panti...@redhat.com>
Date:   2016-10-24T15:31:40Z

    CAMEL-10411 - camel-blueprint. prevent automated restart in case of errors

----


> Camel-Blueprint - failed container gets restarted automatically
> ---------------------------------------------------------------
>
>                 Key: CAMEL-10411
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10411
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-blueprint
>    Affects Versions: 2.18.0
>            Reporter: Paolo Antinori
>            Assignee: Grzegorz Grzybek
>
> In case of a wrong endpoint definition, a {{CamelContext}} could be 
> automatically restarted even if the start operation was correctly aborted.
> This happens because during {{BlueprintCamelContext}}, the {{CamelContext}} 
> instance is registered as a {{ServiceListener}}
> https://github.com/apache/camel/blob/master/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java#L102
> Due to that reason, even after a {{stop()}} call is invoked by the error 
> execution branch of {{start()}}, that instance is receptive to external 
> service events that result in the invocation of this method:
> https://github.com/apache/camel/blob/master/components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintCamelContext.java#L155
> That method has the freedom to start again the {{CamelContext}} instance.
> The proposed solution is to use a {{BlueprintCamelContext}} local flag to 
> keep track of the successful initialization of the Context, to be able to 
> ignore events in case activation wasn't successful.
> Note that the {{BlueprintCamelContext}} instance, un-registers itself as a 
> service listener, only in its {{destroy()}} method.
> Attached to JBoss-Fuse linked case, there is a reproducer that shows the 
> issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to