com.opensymphony.webwork.lifecycle
Class ApplicationLifecycleListener

java.lang.Object
  extended bycom.opensymphony.webwork.lifecycle.ApplicationLifecycleListener
All Implemented Interfaces:
EventListener, ServletContextListener

public class ApplicationLifecycleListener
extends Object
implements ServletContextListener

A servlet context listener to handle the lifecycle of an application-based XWork component manager.

Author:
Joe Walnes, Patrick Lightbody, Bill Lynch (docs)

Constructor Summary
ApplicationLifecycleListener()
           
 
Method Summary
 void contextDestroyed(ServletContextEvent event)
          Destroys the XWork component manager because the server is shutting down.
 void contextInitialized(ServletContextEvent event)
          Initializes the XWork compontent manager.
protected  com.opensymphony.xwork.interceptor.component.DefaultComponentManager createComponentManager()
          Returns a new DefaultComponentManager instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationLifecycleListener

public ApplicationLifecycleListener()
Method Detail

contextDestroyed

public void contextDestroyed(ServletContextEvent event)
Destroys the XWork component manager because the server is shutting down.

Specified by:
contextDestroyed in interface ServletContextListener
Parameters:
event - the servlet context event.

contextInitialized

public void contextInitialized(ServletContextEvent event)
Initializes the XWork compontent manager. Loads component config from the components.xml file in the classpath. Adds the component manager and compontent config as attributes of the servlet context.

Specified by:
contextInitialized in interface ServletContextListener
Parameters:
event - the servlet context event.

createComponentManager

protected com.opensymphony.xwork.interceptor.component.DefaultComponentManager createComponentManager()
Returns a new DefaultComponentManager instance. This method is useful for developers wishing to subclass this class and provide a different implementation of DefaultComponentManager.

Returns:
a new DefaultComponentManager instance.

WebWork Project Page