> So - how do I create an object (or multiple) from within my DAO and DG
> without hard coding the path?

After writing an almost complete example of how to set this up I
realized that I missed the point of your question.  You are referring to
where you get a dog bean once inside your DAO / Gateway, and I first
thought you were asking how to inject your DAO / Gateway into your
service.

So with that said, I think you are close in what you are thinking, but I
would leverage ColdSpring to inject the factory into the DAO / Gateway.
Your CS config would look something like:

<bean id="dogService" class="path.to.service">
        <property name="dogDAO">
                <ref bean="dogDAO"/>
        </property> 
        <property name="dogGateway">
                <ref bean="dogGateway"/>
        </property> 
</bean>

<bean id="dogDAO" class="path.to.DAO">
        <property name="dogFactory">
                <ref bean="dogFactory"/>
        </property>
</bean>

Then you only have one factory creating dog instances and it can be
reused in both your DAO and Gateway.

HTH,

Rich Kroll

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269562
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to