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 java.lang.Throwable |
getErrorAtStartup()
Get the error thrown at startup
|
static java.util.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(java.util.Collection<Module> startedModules,
javax.servlet.ServletContext servletContext) |
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
closeWebApplicationContext, configureAndRefreshWebApplicationContext, createWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, determineContextInitializerClasses, getCurrentWebApplicationContext, initWebApplicationContext, loadParentContext
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 java.lang.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 java.util.Properties getRuntimeProperties()
OpenmrsUtil.getRuntimeProperties(String)
public static void performWebStartOfModules(javax.servlet.ServletContext servletContext) throws ModuleMustStartException, java.lang.Exception
servletContext
- ModuleMustStartException
- if the context cannot restart due to a
MandatoryModuleException
or OpenmrsCoreModuleException
java.lang.Exception
public static void performWebStartOfModules(java.util.Collection<Module> startedModules, javax.servlet.ServletContext servletContext) throws ModuleMustStartException, java.lang.Exception
ModuleMustStartException
java.lang.Exception
Copyright © 2020 OpenMRS Inc.. All Rights Reserved.