public final class Listener
extends org.springframework.web.context.ContextLoaderListener
Constructor and Description |
---|
Listener() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent event)
Called when the webapp is shut down properly Must call Context.shutdown() and then shutdown
all the web layers of the modules
|
void |
contextInitialized(javax.servlet.ServletContextEvent event)
This method is called when the servlet context is initialized(when the Web Application is
deployed).
|
static boolean |
errorOccurredAtStartup()
Boolean flag set by the
contextInitialized(ServletContextEvent) method if an error
occurred when trying to start up. |
static Throwable |
getErrorAtStartup()
Get the error thrown at startup
|
static Properties |
getRuntimeProperties()
Finds and loads the runtime properties
|
static void |
loadBundledModules(javax.servlet.ServletContext servletContext)
Load the pre-packaged modules from web/WEB-INF/bundledModules.
|
static void |
performWebStartOfModules(javax.servlet.ServletContext servletContext)
Call WebModuleUtil.startModule on each started module
|
static boolean |
runtimePropertiesFound()
Boolean flag set on webapp startup marking whether there is a runtime properties file or not.
|
static void |
startOpenmrs(javax.servlet.ServletContext servletContext)
Do the work of starting openmrs.
|
createContextLoader, getContextLoader
public static boolean runtimePropertiesFound()
InitializationFilter
takes over any openmrs url and
redirects to the #SETUP_PAGE_URL
public static boolean errorOccurredAtStartup()
contextInitialized(ServletContextEvent)
method if an error
occurred when trying to start up. The StartupErrorFilter displays the error to the adminpublic static Throwable getErrorAtStartup()
public void contextInitialized(javax.servlet.ServletContextEvent event)
contextInitialized
in interface javax.servlet.ServletContextListener
contextInitialized
in class org.springframework.web.context.ContextLoaderListener
event
- public static void startOpenmrs(javax.servlet.ServletContext servletContext) throws javax.servlet.ServletException
servletContext
- javax.servlet.ServletException
public static void loadBundledModules(javax.servlet.ServletContext servletContext)
servletContext
- the current servlet context for the webapppublic void contextDestroyed(javax.servlet.ServletContextEvent event)
contextDestroyed
in interface javax.servlet.ServletContextListener
contextDestroyed
in class org.springframework.web.context.ContextLoaderListener
ContextLoaderListener.contextDestroyed(javax.servlet.ServletContextEvent)
public static Properties getRuntimeProperties()
OpenmrsUtil.getRuntimeProperties(String)
public static void performWebStartOfModules(javax.servlet.ServletContext servletContext) throws ModuleMustStartException, Throwable
servletContext
- ModuleMustStartException
- if the context cannot restart due to a
MandatoryModuleException
or OpenmrsCoreModuleException
Throwable
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.