Paul, I'm not sure if you're missing the point, ColdSpring will
automatically provide managed CFCs with there dependencies, via
setter methods or constructor args. Just register the two components
and tell it you want the BusinessUnitDGO component to be provided to
the BusinessUnit component:
-services.xml
<bean id="businessUnitDGO" class="BusinessUnitDGO" />
<bean id="businessUnit" class="BusinessUnit">
<constructor-arg name="businessUnitDGO">
<ref bean="businessUnitDGO" />
</constructor-arg>
</bean>
OR
-services.xml
<bean id="businessUnitDGO" class="BusinessUnitDGO" />
<bean id="businessUnit" class="BusinessUnit">
<property name="businessUnitDGO">
<ref bean="businessUnitDGO" />
</property>
</bean>
On Mar 9, 2006, at 3:40 PM, Peter J. Farrell wrote:
Paul Roe said the following on 3/9/2006 2:04 PM:
sorry I wasn't clear, I want the csFactory to be the actual
coldspring
factory object that will be using the xml file
so when I create the factory:
<cfset application.csFactory = createObject("component","
SCAR.coldspring.beans.DefaultXmlBeanFactory").init() />
I want this application.csFactory object to be passed into some of
the services that it will create.
I don't know if that's the best idea. Why can't you let CS inject the
required dependencies into your factory?
.Peter
--
Peter J. Farrell :: Maestro Publishing
Member Team Mach-II :: Member Team Fusion
http://blog.maestropublishing.com
Create boilerplate beans and transfer objects for ColdFusion!
Fire up a cup of Rooibos!
http://rooibos.maestropublishing.com/