public final class WebContainerLifecycle extends AbstractLifeCycle
Behaves according to the request, session, and application contexts of the web application.
WebBeansConfigurationListener
contextsService, logger, scannerService, started, webBeansContext
Constructor and Description |
---|
WebContainerLifecycle()
Creates a new lifecycle instance and initializes
the instance variables.
|
WebContainerLifecycle(WebBeansContext webBeansContext)
Creates a new lifecycle instance and initializes
the instance variables.
|
Modifier and Type | Method and Description |
---|---|
protected void |
afterStartApplication(Object startupObject) |
protected void |
afterStopApplication(Object stopObject) |
protected void |
beforeStartApplication(Object startupObject) |
protected void |
beforeStopApplication(Object stopObject) |
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.
|
afterInitApplication, beforeInitApplication, bootstrapApplication, getBeanManager, getContextService, getWebBeansContext, initApplication
public WebContainerLifecycle()
public WebContainerLifecycle(WebBeansContext webBeansContext)
public void 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.
startApplication
in interface ContainerLifecycle
startApplication
in class AbstractLifeCycle
startupObject
- any startup object.public 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!
stopApplication
in interface ContainerLifecycle
stopApplication
in class AbstractLifeCycle
endObject
- any object provided by application implementor. This can be a ServletContext, etcprotected void afterStartApplication(Object startupObject)
afterStartApplication
in class AbstractLifeCycle
protected void beforeStartApplication(Object startupObject)
beforeStartApplication
in class AbstractLifeCycle
protected void beforeStopApplication(Object stopObject)
beforeStopApplication
in class AbstractLifeCycle
protected void afterStopApplication(Object stopObject)
afterStopApplication
in class AbstractLifeCycle
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.