Package org.sakaiproject.component.impl
Class SakaiContextLoader
- java.lang.Object
-
- org.springframework.web.context.ContextLoader
-
- org.sakaiproject.component.impl.SakaiContextLoader
-
- Direct Known Subclasses:
SakaiContextLoaderListener
public class SakaiContextLoader extends org.springframework.web.context.ContextLoaderSakai's extension to Spring's
ContextLoader- adds the location of the ComponentManager shared AC, linking the local AC to it as parent, and loading localy hosted components into shared.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSPRING_CONTEXT_SUFFIX
-
Constructor Summary
Constructors Constructor Description SakaiContextLoader(org.springframework.web.context.WebApplicationContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcustomizeContext(javax.servlet.ServletContext sc, org.springframework.web.context.ConfigurableWebApplicationContext wac)Allows loading/override of custom bean definitions from sakai.homeprotected org.springframework.context.ApplicationContextloadParentContext(javax.servlet.ServletContext servletContext)Spring allows a parent ApplicationContext to be set during the creation of a new ApplicationContext Sakai sets the SakaiApplicationContext as the parent which managed by the ComponentManager-
Methods inherited from class org.springframework.web.context.ContextLoader
closeWebApplicationContext, configureAndRefreshWebApplicationContext, createWebApplicationContext, determineContextClass, determineContextInitializerClasses, getCurrentWebApplicationContext, initWebApplicationContext, setContextInitializers
-
-
-
-
Field Detail
-
SPRING_CONTEXT_SUFFIX
public static final String SPRING_CONTEXT_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
customizeContext
protected void customizeContext(javax.servlet.ServletContext sc, org.springframework.web.context.ConfigurableWebApplicationContext wac)Allows loading/override of custom bean definitions from sakai.homeThe pattern is the 'servlet_name-context.xml'
- Overrides:
customizeContextin classorg.springframework.web.context.ContextLoader- Parameters:
sc- current servlet contextwac- the new WebApplicationContext
-
loadParentContext
protected org.springframework.context.ApplicationContext loadParentContext(javax.servlet.ServletContext servletContext) throws org.springframework.beans.BeansExceptionSpring allows a parent ApplicationContext to be set during the creation of a new ApplicationContext Sakai sets the SakaiApplicationContext as the parent which managed by the ComponentManager- Overrides:
loadParentContextin classorg.springframework.web.context.ContextLoader- Parameters:
servletContext- (not used)- Returns:
- the shared SakaiApplicationContext
- Throws:
org.springframework.beans.BeansException
-
-