net.sf.oness.common.model.testing
Class SpringApplicationContext

java.lang.Object
  extended bynet.sf.oness.common.model.testing.SpringApplicationContext

public class SpringApplicationContext
extends java.lang.Object

Utility class to cache ApplicationContext loaded from xml classpath files. It is autoconfigured in the xml file called "applicationContext.xml" loaded from the classpath with a bean definition that calls this class constructor with a list of file names.

 <bean id="anyName" 
     class="net.sf.oness.common.model.testing.SpringApplicationContext">
     <constructor-arg>
         <list>
             <value>applicationContext-oness-common-model.xml</value>
             <value>applicationContext-test.xml</value>
         </list>
     </constructor-arg>
 </bean>
 

Version:
$Revision: 1.1 $
Author:
Carlos Sanchez

Constructor Summary
SpringApplicationContext(java.lang.String[] fileNames)
           
 
Method Summary
static org.springframework.context.ApplicationContext getApplicationContext()
          Get the spring application context
static java.lang.Object getBean(java.lang.String name)
          Get a bean from the application context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringApplicationContext

public SpringApplicationContext(java.lang.String[] fileNames)
Method Detail

getApplicationContext

public static org.springframework.context.ApplicationContext getApplicationContext()
Get the spring application context

Returns:

getBean

public static java.lang.Object getBean(java.lang.String name)
Get a bean from the application context

Parameters:
name -
Returns:


Copyright © 2003-2005 ONess Project. All Rights Reserved.