geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Wilkins <>
Subject JSR77 component lifecycle
Date Tue, 12 Aug 2003 12:43:24 GMT

[moving this to geronimo-dev]

From: James Strachan <>
 > 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.


View raw message