Just thought I'd let you know that I solved the issue with the suggestions made in the above linked thread.
I created a beanRefContext.xml file which lists the various xml configuration files that make up my application context.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean name="mainApplicationContext" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>/WEB-INF/dataAccessContext-local.xml</value>
<value>/WEB-INF/applicationContext.xml</value>
</list>
</constructor-arg>
</bean>
</beans>
Then I mapped that file and its contents to the ContextLoaderServlet in my web.xml :
Code:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/dataAccessContext-local.xml /WEB-INF/applicationContext.xml
</param-value>
</context-param>
<context-param>
<param-name>locatorFactorySelector</param-name>
<param-value>classpath*:/WEB-INF/beanRefContext.xml</param-value>
</context-param>
<context-param>
<param-name>parentContextKey</param-name>
<param-value>mainApplicationContext</param-value>
</context-param>
Once I did that I was able to get a handle to my application context via my messaging thread with the following code :
Code:
public static BeanFactory getApplicationContext() {
return ContextSingletonBeanFactoryLocator.getInstance(BEAN_REF_CONTEXT_PATH)
.useBeanFactory(BEAN_REF_CONTEXT_KEY).getFactory();
}
I appreciate the help guys!! I hope this will help others with the same problem.
Thanks,
Dave