Craig R. McClanahan at [EMAIL PROTECTED] wrote:
>
> I do have two design quibbles:
>
> * The initialize() method you added throws LifecycleException, but you
> are not using the remainder of the Lifecycle family of APIs. This is
> not particularly clean, and the obvious answer would be to extend
> pre-start() support in the Lifecycle interface itself. However, this
> would require changes to roughly 50 classes -- way too big to do
> at this point in 4.0, so let's plan on that refactoring in 4.1.
I know, and remembering from what you told me last month, I assumed it was
better to just modify (now) only strictly where those modifications were
needed.
Anyhow, I would have 2 interfaces for Lifecycle, a base lifecycle only with
start() and stop() and something extending it with (let's say) initialize()
and shutdown() (or init() and destroy(), still thinking about naming).
This because I wouldn't want to have ALL components to be allowed to have an
initialization stage running as "root" under unix...
> * I like symmetry :-), so shouldn't there also be some sort of
> shutdown() method that is called after stop() that corresponds to
> initialize() being called before start()?
Yeah. I'm playing around with the Service interface a little bit right now,
and was thinking to change load() into init(), add another destroy() method.
But that will have to be reflected also in the ServiceController...
I dunno... Want to come up with a very simple and clean API, and there are
some lifecycle issues I still want to "clean up" in my mind...
> I'll be playing with the actual code itself today.
Cool... If you compile jsvc for RH71, then you should be able to run
Catalina as nobody but bound to port 80 using Remy's ServiceLoader...
Pier