org.apache.webbeans.spi
Interface ContainerLifecycle


public interface ContainerLifecycle

JSR-299 Container lifecycle.

Version:
$Rev$ $Date$

Method Summary
 BeanManager getBeanManager()
          Gets deployment bean manager instance.
 ContextsService getContextService()
          Gets container's context service implementation.
 void initApplication(Properties properties)
          Initialize lifecycle.
 void startApplication(Object startupObject)
          Starts container.
 void stopApplication(Object endObject)
          Stops means that container removes all bean instances it store, remove contexts and does necessary final actions.
 

Method Detail

initApplication

void initApplication(Properties properties)
Initialize lifecycle.

Implementors can configure their initialization specific actions here.

Parameters:
properties - any properties

startApplication

void startApplication(Object startupObject)
                      throws Exception
Starts container. It discovers all beans in the deployment archive.

For Java EE artifact deployment, it scans all classes and libraries in the deployment archive. There are several types of deployment arhives;

Container uses metadata discovery SPI for scanning archives and act accordingly. If there is an exception while starting, it must abort the deployment and provides information to the developer.

Parameters:
startupObject - any startup object.
Throws:
Exception - exception thrown by startup

stopApplication

void stopApplication(Object endObject)
Stops means that container removes all bean instances it store, remove contexts and does necessary final actions.

Parameters:
endObject - any onject provided by implementors

getBeanManager

BeanManager getBeanManager()
Gets deployment bean manager instance. There is 1-1 correspondence between bean manager and deployment archive.

Returns:
deployment BeanManager instance

getContextService

ContextsService getContextService()
Gets container's context service implementation.

Returns:
container contexts service


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.