org.sakaiproject.component.impl
Class ContextLoader

java.lang.Object
  extended by org.springframework.web.context.ContextLoader
      extended by org.sakaiproject.component.impl.ContextLoader

public class ContextLoader
extends org.springframework.web.context.ContextLoader

Sakai'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
static String SHARED_LOCATION_PARAM
          Name of servlet context parameter that can specify the config location for loading into the shared component set.
 
Fields inherited from class org.springframework.web.context.ContextLoader
CONFIG_LOCATION_PARAM, CONTEXT_CLASS_PARAM, LOCATOR_FACTORY_KEY_PARAM, LOCATOR_FACTORY_SELECTOR_PARAM
 
Constructor Summary
ContextLoader()
           
 
Method Summary
 org.springframework.web.context.WebApplicationContext initWebApplicationContext(javax.servlet.ServletContext servletContext)
          Initialize the local ApplicationContext, link it to the shared context, and load shared definitions into the shared context.
protected  org.springframework.context.ApplicationContext loadParentContext(javax.servlet.ServletContext servletContext)
          Access the shared ApplicationContext
 
Methods inherited from class org.springframework.web.context.ContextLoader
closeWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, getCurrentWebApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHARED_LOCATION_PARAM

public static final String SHARED_LOCATION_PARAM
Name of servlet context parameter that can specify the config location for loading into the shared component set.

See Also:
Constant Field Values
Constructor Detail

ContextLoader

public ContextLoader()
Method Detail

initWebApplicationContext

public org.springframework.web.context.WebApplicationContext initWebApplicationContext(javax.servlet.ServletContext servletContext)
                                                                                throws org.springframework.beans.BeansException
Initialize the local ApplicationContext, link it to the shared context, and load shared definitions into the shared context.

Overrides:
initWebApplicationContext in class org.springframework.web.context.ContextLoader
Parameters:
servletContext - current servlet context
Returns:
the new WebApplicationContext
Throws:
org.springframework.beans.BeansException - if the context couldn't be initialized

loadParentContext

protected org.springframework.context.ApplicationContext loadParentContext(javax.servlet.ServletContext servletContext)
                                                                    throws org.springframework.beans.BeansException
Access the shared ApplicationContext

Overrides:
loadParentContext in class org.springframework.web.context.ContextLoader
Parameters:
servletContext - (not used)
Returns:
The shared application context
Throws:
org.springframework.beans.BeansException


Copyright © 2003-2012 The Sakai Foundation. All Rights Reserved.