}
catch ( Exception e )
{
final String message =
"Cannot set up impl. Unable to create impl class";
throw new InitializationException( message, e );
}
if ( instance instanceof Loggable )
{
throw new InitializationException( "Loggable containers are not supported" );
}
if ( instance instanceof Composable )
{
throw new InitializationException( "Composable containers are not supported" );
}
try
{
final Context implContext = m_contextManager.getChildContext();
final ServiceManager serviceManager =
(ServiceManager) getContextEntry( managerContext, SERVICE_MANAGER );
final LoggerManager loggerManager =
(LoggerManager) serviceManager.lookup( LoggerManager.ROLE );
ContainerUtil.enableLogging( instance, loggerManager.getDefaultLogger() );
ContainerUtil.contextualize( instance, implContext );
ContainerUtil.service( instance, serviceManager );
final Configuration config =
(Configuration) getContextEntry( managerContext, CONFIGURATION );
ContainerUtil.configure( instance, config );
final Parameters parameters =
(Parameters) getContextEntry( managerContext, PARAMETERS );
ContainerUtil.parameterize( instance, parameters );
ContainerUtil.initialize( instance );
ContainerUtil.start( instance );
m_containerInstance = instance;
}
catch ( Exception e )
{
final String message =
"Cannot set up Container. Startup lifecycle failure";
throw new InitializationException( message, e );
}
}