org.ow2.dragon.util
Class SpringUtil

java.lang.Object
  extended by org.ow2.dragon.util.SpringUtil

public class SpringUtil
extends java.lang.Object

An util class to ease Spring integration

Author:
ofabre - eBM WebSourcing

Constructor Summary
SpringUtil()
           
 
Method Summary
static org.springframework.web.context.WebApplicationContext getWebApplicationContext(javax.servlet.ServletContext sc)
          Find the root WebApplicationContext for this web application, which is typically loaded via ContextLoaderListener or ContextLoaderServlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringUtil

public SpringUtil()
Method Detail

getWebApplicationContext

public static org.springframework.web.context.WebApplicationContext getWebApplicationContext(javax.servlet.ServletContext sc)
Find the root WebApplicationContext for this web application, which is typically loaded via ContextLoaderListener or ContextLoaderServlet.

Will rethrow an exception that happened on root context startup, to differentiate between a failed context startup and no context at all.

Parameters:
sc - ServletContext to find the web application context for
Returns:
the root WebApplicationContext for this web app, or null if none
See Also:
WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.