org.openspaces.pu.container.jee.context
Class ProcessingUnitContextLoader
java.lang.Object
org.springframework.web.context.ContextLoader
org.openspaces.pu.container.jee.context.ProcessingUnitContextLoader
public class ProcessingUnitContextLoader
- extends 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(javax.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProcessingUnitContextLoader
public ProcessingUnitContextLoader()
initWebApplicationContext
public WebApplicationContext initWebApplicationContext(javax.servlet.ServletContext servletContext)
throws IllegalStateException,
BeansException
- Overrides:
initWebApplicationContext
in class ContextLoader
- Throws:
IllegalStateException
BeansException
loadParentContext
protected ApplicationContext loadParentContext(javax.servlet.ServletContext servletContext)
throws BeansException
- Returns the application context bound under
JeeProcessingUnitContainerProvider.APPLICATION_CONTEXT_CONTEXT
within the servlet context. This will act as the parent application context.
- Overrides:
loadParentContext
in class ContextLoader
- Throws:
BeansException
createWebApplicationContext
protected WebApplicationContext createWebApplicationContext(javax.servlet.ServletContext servletContext,
ApplicationContext parent)
throws BeansException
- Creates a Spring
WebApplicationContext
- ProcessingUnitWebApplicationContext
.
Adds support to ClusterInfo
and BeanLevelProperties
processors. The objects
themself are bounded in the ServletContext
.
- Overrides:
createWebApplicationContext
in class ContextLoader
- Throws:
BeansException
Copyright © GigaSpaces.