public class SingleAppWebContextLoader extends WebAppContextLoader
AppContext
loader of the web application block packed in a WAR together with the middleware block.Modifier and Type | Class and Description |
---|---|
protected static class |
SingleAppWebContextLoader.SetClassLoaderFilter |
AbstractWebAppContextLoader.CubaServletConfig
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
FRONT_CONTEXT_NAME |
APP_COMPONENTS_PARAM, APP_PROPS_CONFIG_PARAM, APP_PROPS_PARAM, SEPARATOR_PATTERN
SPRING_CONTEXT_CONFIG
Constructor and Description |
---|
SingleAppWebContextLoader() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent) |
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
Here we create servlets and filters manually, to make sure the classes would be loaded using necessary classloader.
|
protected org.springframework.context.support.ClassPathXmlApplicationContext |
createApplicationContext(java.lang.String[] locations) |
protected java.lang.String |
getAppPropertiesConfig(javax.servlet.ServletContext sc) |
protected void |
initWebServletContextListener(javax.servlet.ServletContextEvent servletContextEvent,
javax.servlet.ServletContext sc) |
protected void |
registerAppServlet(javax.servlet.ServletContext servletContext) |
protected void |
registerClassLoaderFilter(javax.servlet.ServletContext servletContext) |
protected void |
registerCubaHttpFilter(javax.servlet.ServletContext servletContext) |
protected void |
registerDispatchServlet(javax.servlet.ServletContext servletContext) |
protected void |
registerFrontAppServlet(javax.servlet.ServletContext servletContext) |
protected void |
registerRestApiServlet(javax.servlet.ServletContext servletContext) |
void |
setJarNames(java.lang.String jarNames)
Invoked reflectively by
SingleAppWebServletListener . |
beforeInitAppContext, getBlock
afterInitAppProperties, initAppComponents, initAppProperties
afterInitAppContext, initAppContext, replaceLocationsFromConf
protected static final java.lang.String FRONT_CONTEXT_NAME
public void setJarNames(java.lang.String jarNames)
SingleAppWebServletListener
.jarNames
- JARs of the core blockpublic void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
contextInitialized
in interface javax.servlet.ServletContextListener
contextInitialized
in class AbstractWebAppContextLoader
public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
contextDestroyed
in interface javax.servlet.ServletContextListener
contextDestroyed
in class AbstractWebAppContextLoader
protected void registerAppServlet(javax.servlet.ServletContext servletContext)
protected void registerDispatchServlet(javax.servlet.ServletContext servletContext)
protected void registerRestApiServlet(javax.servlet.ServletContext servletContext)
protected void registerFrontAppServlet(javax.servlet.ServletContext servletContext)
protected void registerCubaHttpFilter(javax.servlet.ServletContext servletContext)
protected void registerClassLoaderFilter(javax.servlet.ServletContext servletContext)
protected org.springframework.context.support.ClassPathXmlApplicationContext createApplicationContext(java.lang.String[] locations)
createApplicationContext
in class AbstractAppContextLoader
protected java.lang.String getAppPropertiesConfig(javax.servlet.ServletContext sc)
getAppPropertiesConfig
in class AbstractWebAppContextLoader
protected void initWebServletContextListener(javax.servlet.ServletContextEvent servletContextEvent, javax.servlet.ServletContext sc)