I am using Mule/ Spring XML to define a set of spring beans.
I can create a bean using the following xml without wraping them in spring:beans element like so:
<spring:bean id="myFactoryBean" class="org.test.MyFactoryBean" />
But If I try referencing another bean it doesn't work unless I wrap both beans in the same spring beans:element like so:
<spring:beans>
<spring:bean id="myFactoryBean" class="org.test.MyFactoryBean" />
<spring:bean id="MyBean" class="org.test.MyBean" c:factory-ref="myFactoryBean" />
</spring:beans>
Why do I have to wrap them for them to have visibilty of each other? Is this a generic Spring XML requirement?