Warning message of duplicates during multiple application context processing
----------------------------------------------------------------------------
Key: TUSCANY-3185
URL: https://issues.apache.org/jira/browse/TUSCANY-3185
Project: Tuscany
Issue Type: Bug
Components: Java SCA Spring Implementation Extension
Affects Versions: Java-SCA-2.0, Java-SCA-Next
Reporter: Ramkumar Ramalingam
Assignee: Ramkumar Ramalingam
Fix For: Java-SCA-2.0, Java-SCA-Next
For the following scenarios....
Scenario 1:
<beans>
<import resource="MyBean1.xml"> --> which contains a <bean id="X"
class="foo.Bar1"/>
<bean id="X" class="foo.Bar2"/>
<import resource="MyBean2.xml"> --> which contains a <bean
id="X" class="foo.Bar3"/>
</beans>
here the imports are processed in the order its defined, so the bean of type
"foo.Bar2" will override the bean of type "foo.Bar1", and the bean of type
"foo.Bar3" will override the bean of type "foo.Bar2". So finally the type of
bean X is "foo.Bar3".
Same rule applies in case of multiple application loading using
"ClassPathXmlApplicaitonContext"... for example
<bean id="beanRefFactory"
class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg>
<list>
<value>MyBean1.xml</value> --> which contains a <bean
id="X" class="foo.Bar1"/>
<value>MyBean2.xml</value> --> which contains a <bean
id="X" class="foo.Bar3"/>
</list>
</constructor-arg>
</bean>
here the bean of type "foo.Bar3" will override the bean of type "foo.Bar1". So
finally the type of bean X is "foo.Bar3".
In these scenarios, the runtime throws warning message for the potential
duplicate references and properties defined for the bean.
We need to suppress this warning message and handle the duplicate accordingly.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.