I think that ColdSpring ignores aliases declared in a factory if there
are no real beans in the factory:
Application.cfc
<cfcomponent output="false">
<cfset this.name = "cstest" />
</cfcomponent>
Dummy.cfc
<cfcomponent output="false">
</cfcomponent>
cs.xml
<beans>
<bean id="parent" class="test.cs.Dummy"/>
</beans>
cs1.xml
<beans>
<bean id="cs1" class="test.cs.Dummy"/>
<alias name="parent" alias="child1"/>
</beans>
cs2.xml
<beans>
<alias name="parent" alias="child2"/>
</beans>
index.cfm
<!--- create parent bean factory --->
<cfset p =
createObject("component","coldspring.beans.DefaultXmlBeanFactory").init()
/>
<cfset p.loadBeans("/test/cs/cs.xml") />
<!--- create a couple of unique child factories that both use alias to
a parent bean --->
<cfset c1 =
createObject("component","coldspring.beans.DefaultXmlBeanFactory").init()
/>
<cfset c1.setParent(p) />
<cfset c1.loadBeans("/test/cs/cs1.xml") />
<cfset c2 =
createObject("component","coldspring.beans.DefaultXmlBeanFactory").init()
/>
<cfset c2.setParent(p) />
<cfset c2.loadBeans("/test/cs/cs2.xml") />
<!--- these work --->
<cfset a = p.getBean("parent") />
<cfset b = c1.getBean("parent") />
<cfset c = p.getBean("sibling") />
<cfset d = c1.getBean("child1") />
<!--- this fails --->
<cfset e = c2.getBean("child2") />
I'm guessing that if there are no <bean> tags, ColdSpring doesn't look
for <alias> tags...?
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood