org.appfuse.webapp.listener
Class StartupListener
java.lang.Object
org.springframework.web.context.ContextLoaderListener
org.appfuse.webapp.listener.StartupListener
- All Implemented Interfaces:
- EventListener, ServletContextListener
public class StartupListener
- extends ContextLoaderListener
- implements ServletContextListener
StartupListener class used to initialize and database settings
and populate any application-wide drop-downs.
Keep in mind that this listener is executed outside of OpenSessionInViewFilter,
so if you're using Hibernate you'll have to explicitly initialize all loaded data at the
Dao or service level to avoid LazyInitializationException. Hibernate.initialize() works
well for doing this.
- Author:
- Matt Raible
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StartupListener
public StartupListener()
contextInitialized
public void contextInitialized(ServletContextEvent event)
- Specified by:
contextInitialized
in interface ServletContextListener
- Overrides:
contextInitialized
in class ContextLoaderListener
setupContext
public static void setupContext(ServletContext context)
Copyright � 2002-2006