You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by David Hoffer <dh...@gmail.com> on 2015/11/20 00:49:44 UTC

GenericFileExclusiveReadLockStrategy#prepareOnStartup() question

What is the lifecycle of
the GenericFileExclusiveReadLockStrategy#prepareOnStartup() method.  I'm
assuming that it will never be called more than once at startup...but is
that correct?

We store state in our custom GenericFileExclusiveReadLockStrategy class and
the state is cleared when prepareOnStartup() is called.

Is there any edge cases that could cause this method to be called more than
at startup of the app?

-Dave

Re: GenericFileExclusiveReadLockStrategy#prepareOnStartup() question

Posted by David Hoffer <dh...@gmail.com>.
Okay very good, that is what I thought but wanted to be sure.

-Dave

On Thu, Nov 19, 2015 at 11:42 PM, Claus Ibsen <cl...@gmail.com> wrote:

> No its only executed one time on the first poll.
>
> If you stop and remove the route, and add another similar route back,
> then yeah its a new route/consumer and it will be called again.
>
> On Fri, Nov 20, 2015 at 12:49 AM, David Hoffer <dh...@gmail.com> wrote:
> > What is the lifecycle of
> > the GenericFileExclusiveReadLockStrategy#prepareOnStartup() method.  I'm
> > assuming that it will never be called more than once at startup...but is
> > that correct?
> >
> > We store state in our custom GenericFileExclusiveReadLockStrategy class
> and
> > the state is cleared when prepareOnStartup() is called.
> >
> > Is there any edge cases that could cause this method to be called more
> than
> > at startup of the app?
> >
> > -Dave
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: GenericFileExclusiveReadLockStrategy#prepareOnStartup() question

Posted by Claus Ibsen <cl...@gmail.com>.
No its only executed one time on the first poll.

If you stop and remove the route, and add another similar route back,
then yeah its a new route/consumer and it will be called again.

On Fri, Nov 20, 2015 at 12:49 AM, David Hoffer <dh...@gmail.com> wrote:
> What is the lifecycle of
> the GenericFileExclusiveReadLockStrategy#prepareOnStartup() method.  I'm
> assuming that it will never be called more than once at startup...but is
> that correct?
>
> We store state in our custom GenericFileExclusiveReadLockStrategy class and
> the state is cleared when prepareOnStartup() is called.
>
> Is there any edge cases that could cause this method to be called more than
> at startup of the app?
>
> -Dave



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