geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <james_strac...@yahoo.co.uk>
Subject Re: JSR77 component lifecycle
Date Tue, 12 Aug 2003 13:59:56 GMT

On Tuesday, August 12, 2003, at 01:43  pm, Greg Wilkins wrote:

>
> [moving this to geronimo-dev]
>
> From: James Strachan <james@coredevelopers.net>
> > To put that another way. If we can use JSR 77 lifecycle API then I
> > absolutely think we should - unless there's a good technical reason 
> for
> > not doing so.
>
>
> At the very least, it would be good to match our component lifecycle to
> Jsr77, which is
>
>   STOPPED --start()--> STARTING --> RUNNING --stop()--> STOPPING --> 
> STOPPED
>
> plus a FAILED state and a few other transitions.
>
> Geronimo currently has:
>
>   NOT_CREATED --create--> STOPPED 
> --start()-->STARTED--stop()-->STOPPED--destroy()-->DESTROYED
>
> Not that far apart really (well how far apart can such things be :-)
>
> I think it would be good to:
>  + rename STARTED to RUNNING
>  + Add the STARTING and STOPPING states, because these operations are
>    definitely not atomic and it would be good to recognise that.
>  + AbstractComponent would set STARTING state, call a doStart() method
>    and then set RUNNING state (if no exception is thrown)
>  + Consider if we really need NOT_CREATED and DESTROYED states?
>
> Maybe even
>  + Use the numeric state values defined in the spec as part of
>    the State class, so that fast state switches can be done.
>  + define startRecursive and stopRecursive
>
> I think we should do this rather sooner rather than later - before 
> there
> is too much more code to refactor.   We can consider how much other
> of JSR77 we support in the generic G component later.
>
>
> I'm happy to do this refactor unless somebody else wants it.

Looks good. Go for it Greg. Making the core geronimo lifecycle be JSR 
77 compliant seems a no brainer since we're already so close.

We can adapt and bind to multiple component lifecycle APIs if folks 
want to add their own (e.g. Avalon lifecycles etc). However 
implementing the JSR 77 standard by default inside Geronimo seems like 
a good idea to me.

James
-------
http://radio.weblogs.com/0112098/


Mime
View raw message