Hello,

I have a spring based web application. In web.xml I specify 3 context files:

a.xml:
Code:
<beans>
	<bean id="aBean" class="com.mycompany.ws.A" >
		<constructor-arg ref="b1Bean" />
	</bean>
</beans>
b.xml:
Code:
<beans>
	<bean id="b1Bean" class="com.mycompany.ws.B" />
</beans>
c.xml:
Code:
<beans>
	<bean id="b2Bean" class="com.mycompany.ws.B" />
</beans>
So, A needs a b1Bean to be passed in the constructor. Note that both B beans have the same implementation class.

The problem is that b2Bean is passed instead.

The beans are more complex than this, I don't think the details matter.

Any thoughts, ideas, solutions?


Thanks