SourceForge.net Logo

de.mindmatters.faces.spring.config
Class ConfigLoaderListener

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

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

Bootstrap listener to start up jsf-spring-config root ConfigWebApplicationContext. Simply delegates to ConfigLoader.

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 ConfigLoaderServlet. See the latter's Javadoc for details.

Author:
Andreas Kuhrwahl
See Also:
ContextLoader, ContextLoaderServlet

Constructor Summary
ConfigLoaderListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Closes the jsf-spring-config root web application context.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Initializes the jsf-spring-config root web application context.
protected  ConfigLoader createConfigLoader()
          Creates the ConfigLoader to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigLoaderListener

public ConfigLoaderListener()
Method Detail

createConfigLoader

protected ConfigLoader createConfigLoader()
Creates the ConfigLoader to use. Can be overridden in subclasses.

Returns:
the new ConfigLoader

contextInitialized

public final void contextInitialized(javax.servlet.ServletContextEvent event)
Initializes the jsf-spring-config root web application context.

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

contextDestroyed

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

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

SourceForge.net Logo

Copyright © 2002 mindmatters GmbH & Co. KG