Class ProcessingUnitContextLoader
java.lang.Object
org.springframework.web.context.ContextLoader
org.openspaces.pu.container.jee.context.ProcessingUnitContextLoader
public class ProcessingUnitContextLoader
extends org.springframework.web.context.ContextLoader
Same as Spring
ContextLoader. Different in two aspects:
The first, it automatillcay loads the binded META-INF/spring/pu.xml (binded
into the servlet context) as the parent application context. See loadParentContext(jakarta.servlet.ServletContext).
Second, it overrides the creation of
WebApplicationContext and automatically adds ClusterInfo and BeanLevelProperties
handling. It also delegates the objects to the web context level Spring application context.
- Author:
- kimchy
-
Field Summary
Fields inherited from class org.springframework.web.context.ContextLoader
CONFIG_LOCATION_PARAM, CONTEXT_CLASS_PARAM, CONTEXT_ID_PARAM, CONTEXT_INITIALIZER_CLASSES_PARAM, GLOBAL_INITIALIZER_CLASSES_PARAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.web.context.WebApplicationContextcreateWebApplicationContext(jakarta.servlet.ServletContext servletContext, org.springframework.context.ApplicationContext parent) Creates a SpringWebApplicationContext-ProcessingUnitWebApplicationContext.org.springframework.web.context.WebApplicationContextinitWebApplicationContext(jakarta.servlet.ServletContext servletContext) protected org.springframework.context.ApplicationContextloadParentContext(jakarta.servlet.ServletContext servletContext) Returns the application context bound underJeeProcessingUnitContainerProvider.APPLICATION_CONTEXT_CONTEXTwithin the servlet context.Methods inherited from class org.springframework.web.context.ContextLoader
closeWebApplicationContext, configureAndRefreshWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, determineContextInitializerClasses, getCurrentWebApplicationContext, setContextInitializers
-
Constructor Details
-
ProcessingUnitContextLoader
public ProcessingUnitContextLoader()
-
-
Method Details
-
initWebApplicationContext
public org.springframework.web.context.WebApplicationContext initWebApplicationContext(jakarta.servlet.ServletContext servletContext) throws IllegalStateException, org.springframework.beans.BeansException - Overrides:
initWebApplicationContextin classorg.springframework.web.context.ContextLoader- Throws:
IllegalStateExceptionorg.springframework.beans.BeansException
-
loadParentContext
protected org.springframework.context.ApplicationContext loadParentContext(jakarta.servlet.ServletContext servletContext) throws org.springframework.beans.BeansException Returns the application context bound underJeeProcessingUnitContainerProvider.APPLICATION_CONTEXT_CONTEXTwithin the servlet context. This will act as the parent application context.- Overrides:
loadParentContextin classorg.springframework.web.context.ContextLoader- Throws:
org.springframework.beans.BeansException
-
createWebApplicationContext
protected org.springframework.web.context.WebApplicationContext createWebApplicationContext(jakarta.servlet.ServletContext servletContext, org.springframework.context.ApplicationContext parent) throws org.springframework.beans.BeansException Creates a SpringWebApplicationContext-ProcessingUnitWebApplicationContext.Adds support to
ClusterInfoandBeanLevelPropertiesprocessors. The objects themself are bounded in theServletContext.- Throws:
org.springframework.beans.BeansException
-