The applicationContext.xml is loaded via the BeanFactoryLocator from a beanRefFactory.xml which is pickup from the classpath. It contains the following:
<beans>
<bean id="za.co"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>spring.xml</value>
</list>
</constructor-arg>
</bean>
</beans>
The retrieving of beans is handled by a static class called SpringLoader. This accomplished with the following:
BeanFactoryLocator bfl = SingletonBeanFactoryLocator.getInstance();
BeanFactoryReference bf = bfl.useBeanFactory( "za.co" );
return bf.getFactory().getBean( _beanId );
This reduced the need to have static/constructor definitions for :
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "applicationContext.xml" ) all over the show.
On 9/13/06, Jeff Mutonho <[EMAIL PROTECTED]> wrote:
What strategy do you guys use to write spring enabled JUnit test cases?I'm more concerned with issues relating to
loading the root context , applicationContext.xml.
--
Jeff Mutonho
GoogleTalk : ejbengine
Skype : ejbengine
Registered Linux user number 366042
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---
