[a4:fortress] AbstractContainer
Leo Simons <[email protected]> Sun, 05 Jan 2003 22:35:10 +0100
| Newsgroups | gmane.comp.jakarta.avalon.apps.devel,gmane.comp.jakarta.avalon.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi gang,
should fortress's AbstractContainer be modified to more fully support a
lifecycle for its ComponentHandlers?
I'm looking at this code right now:
ContainerUtil.contextualize( targetHandler, m_context );
final DefaultServiceManager serviceManager =
new DefaultServiceManager( getServiceManager() );
serviceManager.put( ObjectFactory.ROLE, factory );
serviceManager.makeReadOnly();
ContainerUtil.service( targetHandler, serviceManager );
ContainerUtil.configure( targetHandler, configuration );
ContainerUtil.initialize( targetHandler );
if( targetHandler instanceof Instrumentable )
{
final Instrumentable instrumentable =
(Instrumentable)targetHandler;
final String name = instrumentable.getInstrumentableName();
m_instrumentManager.registerInstrumentable(
instrumentable, name );
}
I can see why there's no enableLogging() (a LoggerManager is used
instead), but should there be a possiblity for start() and stop()? If
not, the contract surrounding ComponentHandler needs to be updated (it
needs to be specified anyway, but I'm not sure what it should be).
cheers,
- Leo