GigaSpaces XAP 9.7.2 API

org.openspaces.pu.container.jee.context
Class ProcessingUnitContextLoader

java.lang.Object
  extended by org.springframework.web.context.ContextLoader
      extended by 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

Field Summary
 
Fields inherited from class org.springframework.web.context.ContextLoader
CONFIG_LOCATION_PARAM, CONTEXT_CLASS_PARAM, CONTEXT_ID_PARAM, CONTEXT_INITIALIZER_CLASSES_PARAM, LOCATOR_FACTORY_KEY_PARAM, LOCATOR_FACTORY_SELECTOR_PARAM
 
Constructor Summary
ProcessingUnitContextLoader()
           
 
Method Summary
protected  WebApplicationContext createWebApplicationContext(javax.servlet.ServletContext servletContext, ApplicationContext parent)
          Creates a Spring WebApplicationContext - ProcessingUnitWebApplicationContext.
 WebApplicationContext initWebApplicationContext(javax.servlet.ServletContext servletContext)
           
protected  ApplicationContext loadParentContext(javax.servlet.ServletContext servletContext)
          Returns the application context bound under JeeProcessingUnitContainerProvider.APPLICATION_CONTEXT_CONTEXT within the servlet context.
 
Methods inherited from class org.springframework.web.context.ContextLoader
closeWebApplicationContext, configureAndRefreshWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, determineContextInitializerClasses, getCurrentWebApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessingUnitContextLoader

public ProcessingUnitContextLoader()
Method Detail

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

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.