Bernd Fondermann ha scritto: > Stefano, > > Thanks for your comment! > > I just debugged James(Phoenix) and was very surprised to find that the > lifecycle calling sequence is traversing deep (all lifecycle methods > for one component, then for the second) instead of calling one > lifecycle method for all components, then the next method for all > components. > > I don't know how I got to assume it must be the other way round, but > this way it makes even less sense to me to have that many lifecycle > methods and interfaces!
Well, I have been suprised too when I found out this in past. I think that so many interfaces have been created to provide self documenting services/components. IMHO, now that I'm getting used to it, it is not so bad as I thought the first time I used avalon. About the lifecycle order I think the only contract is that services are passed around as fully initialized. Everything else is implementation specific (phoenix does what you debugged, so one component at a time). The main problem was that there was no documentation, so I only discovered this while reading the source code for phoenix. You may be interested in the phoenix classes that manage the lifecycle: org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor The root for this sources is here: http://svn.apache.org/viewvc/avalon/cvs-migration-snapshot/avalon-phoenix/ Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
