> on 12/6/2000 12:43 PM, "Rafal Krzewski" <[EMAIL PROTECTED]> wrote:
>
> > Hey Magnus, this is not the proper way of solving the problem. I think
> > that it's the services that are misbehaving. When a service
> > calls setInit(true), no further initialization attempts will be made
> > (check BaseInitableBroker.java, lines 150 & 210). Some services
> > need both early and late initialization, therefore setInit(true) can
> > not be called in early initalization routines. Another flag can be
> > used by such service, to safeguard against double initialization.
> >
> > Tell me which services are giving you trouble, and I can fix them.
> >
> > Rafal
>
> Ug. You are right. I'm going to back out that code from
> Turbine.java. I have
> a feeling that the problem service is the Scheduler service because it was
> init'd twice...once in Turbine.java and once within itself.
>
> -jon
>

Yes Rafal, totally, I'm sorry about that.  And go figure, it
were some of my own services that were misbehaving.

On the other hand, is it the best way to solve the problem of
single init to have each service responsible of setting the init
variable to true.  As an alternative, I am thinking of a variation
of the build/doBuild scheme that are used in Screens.

I am thinking of a (possibly final) runInit() function in
BaseInitable, that does nothing except call init() and register
the fact that this service has already been inited.  This would
ideally be a separate init variable, not dependent upon SUCCESSFUL
init, but only upon init being called.

Just a thought,

Magnus.

ps. The logger code when initing is outputting rather untidy output,
there is no \n at the end.  I patched it up locally by hardcoding an \n
in the calls to the logger, but this is obviously not the best way to
solve the problem.  (It's a small itch, and I won't scratch it for now,
especially since I'm hoping that someone is already creating a Logging
Service)



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to