org.broadleafcommerce.profile.web.extensibility
Class MergeContextLoaderListener

java.lang.Object
  extended by org.broadleafcommerce.profile.web.extensibility.MergeContextLoaderListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public class MergeContextLoaderListener
extends Object
implements javax.servlet.ServletContextListener

Bootstrap listener to start up BroadleafCommerce's rootId MergeWebApplicationContext. Simply delegates to MergeContextLoader.

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

Author:
Jeff Fischer

Constructor Summary
MergeContextLoaderListener()
           
 
Method Summary
 void contextDestroyed(javax.servlet.ServletContextEvent event)
          Close the rootId web application context.
 void contextInitialized(javax.servlet.ServletContextEvent event)
          Initialize the rootId web application context.
protected  MergeContextLoader createContextLoader()
          Create the ContextLoader to use.
 MergeContextLoader getContextLoader()
          Return the ContextLoader used by this listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeContextLoaderListener

public MergeContextLoaderListener()
Method Detail

contextInitialized

public void contextInitialized(javax.servlet.ServletContextEvent event)
Initialize the rootId web application context.

Specified by:
contextInitialized in interface javax.servlet.ServletContextListener

createContextLoader

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

Returns:
the new ContextLoader

getContextLoader

public MergeContextLoader getContextLoader()
Return the ContextLoader used by this listener.

Returns:
the current ContextLoader

contextDestroyed

public void contextDestroyed(javax.servlet.ServletContextEvent event)
Close the rootId web application context.

Specified by:
contextDestroyed in interface javax.servlet.ServletContextListener


Copyright © 2011. All Rights Reserved.