I've added a new demo. This one does nothing other than demonstrate the order of calling of lifecycle methods for two interdependant blocks.

Educational for many I guess including me. I had thought that all comps were passed thru enableLogging(), then all comps passed thru contextualize() then ... , but it ain't so.

-ph

----
Phoenix 4.0.1
LifecycleDemo1Impl.constructor() called. (You should never do too much in here)
LifecycleDemo1Impl.enableLogging() called.
LifecycleDemo1Impl.contextualize() called (things like base directory passed in here).
LifecycleDemo1Impl.service() called (lookup on other services possible now).
LifecycleDemo1Impl.configure() called (configuration from config.xml passed here).
LifecycleDemo1Impl.initialize() called.
LifecycleDemo1Impl.start() called.
LifecycleDemo2Impl.constructor() called. (You should never do too much in here)
LifecycleDemo2Impl.enableLogging() called.
LifecycleDemo2Impl.contextualize() called (things like base directory passed in here).
LifecycleDemo2Impl.service() called (lookup on other services possible now).
LifecycleDemo2Impl.service(), LifecycleDemo1 service looked up
LifecycleDemo2Impl.configure() called (configuration from config.xml passed here).
LifecycleDemo2Impl.initialize() called.
LifecycleDemo1Impl.myServiceMethod() called.
LifecycleDemo2Impl.initialize(), LifecycleDemo1.myServiceMethod() method called result = 123
LifecycleDemo2Impl.start() called.
(Ctrl-C pressed) JVM exiting abnormally. Shutting down Phoenix.
LifecycleDemo2Impl.stop() called.
LifecycleDemo2Impl.dispose() Called
LifecycleDemo1Impl.stop() called.
LifecycleDemo1Impl.dispose() Called


--
To unsubscribe, e-mail: <mailto:avalon-phoenix-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-phoenix-dev-help@;jakarta.apache.org>

Reply via email to