You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Zoran Regvart <zo...@regvart.com> on 2017/06/13 08:30:02 UTC

Re: [HEADS UP] Revision of CamelContext startup/stoppage with Spring is now in master

Hi Cameleers,
I've discussed the change with WildFly Camel folks and the current
2.20.x branch with the changed behaviour is working for them.

Just to reiterate, the SpringCamelContext::setNoStart behaviour
changed in 2.20, it used to mean "don't start automatically with
Spring application context", in 2.20 it means just "don't start". So
in order to start, if previously set:

SpringCamelContext.setNoStart(true)

before SpringCamelContext::start, one must invoke:

SpringCamelContext.setNoStart(false)

I've tried to make the new startup/shutdown behaviour work with
`noStart` flag as it used to work before 2.20, but it gets complicated
really quickly.

I think that in the future we should remove the `noStart` flag and
have a mechanism that is not tied to thread local or global state,
i.e. per Camel context instance.

While getting there, are there any objections on keeping this new
state: `noStart` flag means do not start (unconditionally)? I can
invest more time into getting the new startup/shutdown order working
with `noStart` behaviour as it used to, and I'm sure I can get it
done, but I think that the idea of removing thread local flag is
better in the long run.

So my proposal is to close CAMEL-11261[1] and create new issue for the
replacement of `noStart` flag with a per context instance mechanism.

zoran

[1] https://issues.apache.org/jira/browse/CAMEL-11261
-- 
Zoran Regvart

Re: [HEADS UP] Revision of CamelContext startup/stoppage with Spring is now in master

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah that is fine.

The noStart flag stuff is not intended for end users but a special
flag to Camel itself in the bootstrap of Camel when using Spring and
unit tests etc.



On Tue, Jun 13, 2017 at 10:30 AM, Zoran Regvart <zo...@regvart.com> wrote:
> Hi Cameleers,
> I've discussed the change with WildFly Camel folks and the current
> 2.20.x branch with the changed behaviour is working for them.
>
> Just to reiterate, the SpringCamelContext::setNoStart behaviour
> changed in 2.20, it used to mean "don't start automatically with
> Spring application context", in 2.20 it means just "don't start". So
> in order to start, if previously set:
>
> SpringCamelContext.setNoStart(true)
>
> before SpringCamelContext::start, one must invoke:
>
> SpringCamelContext.setNoStart(false)
>
> I've tried to make the new startup/shutdown behaviour work with
> `noStart` flag as it used to work before 2.20, but it gets complicated
> really quickly.
>
> I think that in the future we should remove the `noStart` flag and
> have a mechanism that is not tied to thread local or global state,
> i.e. per Camel context instance.
>
> While getting there, are there any objections on keeping this new
> state: `noStart` flag means do not start (unconditionally)? I can
> invest more time into getting the new startup/shutdown order working
> with `noStart` behaviour as it used to, and I'm sure I can get it
> done, but I think that the idea of removing thread local flag is
> better in the long run.
>
> So my proposal is to close CAMEL-11261[1] and create new issue for the
> replacement of `noStart` flag with a per context instance mechanism.
>
> zoran
>
> [1] https://issues.apache.org/jira/browse/CAMEL-11261
> --
> Zoran Regvart



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