Class ServletContextListenerImpl

java.lang.Object
com.tangosol.util.Base
com.tangosol.coherence.servlet.api23.ServletContextListenerImpl
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public class ServletContextListenerImpl extends Base implements javax.servlet.ServletContextListener
An implementation of the ServletContextListener interface that will listen to application server events when the application is deployed with its own ServletContextListener(s) declared, so that the events can be forwarded to the application's listener(s). Primarily, this is required to override the ServletContext reference passed in the event. This implementation would only need to be registered in the deployment descriptor if the servlet context of the application server is being wrapped by Coherence AND if the application has classes listed in the deployment descriptor that implement the ServletContextListener interface.
Version:
Coherence 2.3
Author:
cp 2003.07.23
  • Constructor Details

    • ServletContextListenerImpl

      public ServletContextListenerImpl()
      Public default constructor; required by spec.
  • Method Details

    • contextInitialized

      public void contextInitialized(javax.servlet.ServletContextEvent evt)
      Notification that the web application initialization process is starting. All ServletContextListeners are notified of context initialisation before any filter or servlet in the web application is initialized.
      Specified by:
      contextInitialized in interface javax.servlet.ServletContextListener
      Parameters:
      evt - the ServletContextEvent
    • contextDestroyed

      public void contextDestroyed(javax.servlet.ServletContextEvent evt)
      Notification that the servlet context is about to be shut down. All servlets have been had their destroy() method called before any ServletContextListeners are notified of context destruction.
      Specified by:
      contextDestroyed in interface javax.servlet.ServletContextListener
      Parameters:
      evt - the ServletContextEvent
    • getSessionHelper

      protected SessionHelper getSessionHelper()
      Get the SessionHelper.
      Returns:
      the SessionHelper for this app
    • getServletContext

      protected javax.servlet.ServletContext getServletContext()
      Get the Coherence ServletContext.
      Returns:
      the Coherence ServletContext
    • getListeners

      protected Listeners getListeners()
      Get the application ServletContextEvent listeners.
      Returns:
      the application ServletContextEvent listeners
    • init

      protected Exception init(javax.servlet.ServletContextEvent evt)
      Configure the listener from the passed event object.
      Parameters:
      evt - a ServletContextEvent that the listener can use to configure itself
      Returns:
      an optional initialization Exception