I have 2 projects. Both with "Spring Project Nature". In the second project I want to use beans from the first project. Therefore I've added the first project under the Project References and created a config set that holds the spring config file from the first project. I can see that config set in the second projcet under properties. So I thought everything would be alright. But it is not.
Is there anything more I have to add e.g. in my web.xml file? So far my web.xml file looks like this:
The referencened common-data1.xml looks like this:
<bean id="transactionManager" class="org.springframework.orm.hibernate3.Hibernat eTransactionManager">
<property name="sessionFactory"><ref bean="sessionFactory"/></property>
<!-- sessionFactory and every other bean used in that project are configured in the springConfig.xml of the first project -->
While deploying on JBOSS 3.2.6 there is an exception thrown caused by the entry "sessionFactory" in common-data1.xml. Because this bean couldn't be found. Although it is configured in the springConfig.xml file of the first project.
What is wrong here?
What, if I only want to use the springConfig.xml file from the first project, without any extra bean configuration in that
second project? I deleted the section "contextConfigLocation" in my web.xml and was hoping, that now only the referenced file from the config set would be taken. But this was not the
case! While deploying, a config file named "/WEB-INF/applicationContext.xml" had to be loaded. But of course I don't have such a file, because I wanna use my springConfig.xml from the first project. That caused an exception again. What can I do?
Thank you for your support