SourceForge.net Logo

de.mindmatters.faces.spring.context
Class ContextLoaderListener

java.lang.Object
  extended byde.mindmatters.faces.spring.context.ContextLoaderListener
All Implemented Interfaces:
java.util.EventListener, javax.servlet.ServletContextListener

public class ContextLoaderListener
extends java.lang.Object
implements javax.servlet.ServletContextListener

Bootstrap listener to start up faces' root WebApplicationContext. Simply delegates to ContextLoader.

This listener should be registered after Log4jConfigListener in web.xml, if the latter is used.

This listener must be registered after any listeners which start the configuration of the used jsf-implementation in web.xml.

For Servlet 2.2 containers and Servlet 2.3 ones that do not initalize listeners before servlets, use ContextLoaderServlet. See the latter's Javadoc for details.

Author:
Andreas Kuhrwahl
See Also:
ContextLoader, ContextLoaderServlet

Constructor Summary
ContextLoaderListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Closes the root web application context.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Initializes the faces root web application context.
protected  ContextLoader createContextLoader()
          Creates the ContextLoader to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextLoaderListener

public ContextLoaderListener()
Method Detail

createContextLoader

protected ContextLoader createContextLoader()
Creates the ContextLoader to use. Can be overridden in subclasses.

Returns:
the new ContextLoader

contextInitialized

public final void contextInitialized(javax.servlet.ServletContextEvent event)
Initializes the faces root web application context.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener
Parameters:
event - the ServletContextEvent
See Also:
#contextInitialized(javax.servlet.ServletContextEvent)

contextDestroyed

public final void contextDestroyed(javax.servlet.ServletContextEvent event)
Closes the root web application context.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener
Parameters:
event - the ServletContextEvent
See Also:
#contextDestroyed(javax.servlet.ServletContextEvent)

SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG