public interface ContainerLifecycle
Implement this interface to provide own container initialization logic.
From the application point of view this interface can be used to start and stop OpenWebBeans.
| Modifier and Type | Method and Description |
|---|---|
javax.enterprise.inject.spi.BeanManager |
getBeanManager()
Get the underlying
BeanManager instance for the current application. |
ContextsService |
getContextService()
Gets container's context service implementation.
|
void |
initApplication(Properties properties)
Initialize lifecycle.
|
void |
startApplication(Object startupObject)
Starts container.
|
void |
stopApplication(Object endObject)
Stopping the Application means that the container destroys all bean instances
it stores, cleans and removes all contexts and does other necessary
cleanup actions.
|
void initApplication(Properties properties)
Implementors can configure their initialization specific actions here.
properties - any propertiesvoid startApplication(Object startupObject)
For Java EE artifact deployment, it scans all classes and libraries in all deployment archives in the classpath. There are several types of deployment archives;
Container uses ScannerService 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.
startupObject - any startup object.void stopApplication(Object endObject)
Stopping the Application means that the container destroys all bean instances it stores, cleans and removes all contexts and does other necessary cleanup actions.
Attention: Accessing the BeanManager or any bean proxy after the shutdown will result in non-portable behaviour!
endObject - any object provided by application implementor. This can be a ServletContext, etcjavax.enterprise.inject.spi.BeanManager getBeanManager()
BeanManager instance for the current application.
There is 1-1 correspondence between a bean manager and a deployed (web-) application.BeanManager instanceContextsService getContextService()
Copyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.