Chris, Absolutely. I would also recommend bean definitions for...
<bean id="datasource" factory-bean="transferFactory" factory-method="getDatasource" /> <bean id="transaction" factory-bean="transferFactory" factory-method="getTransaction" /> Paul On Wed, Nov 19, 2008 at 11:48 AM, Chris Blackwell <[EMAIL PROTECTED]> wrote: > Hi > > I have transfer setup up in my applications coldspring, and i'm wondering > whether its ok to ask cs to create an instance of transfer.com.Transfer > using the factory-bean/factory-method attributes, rather than having to do > transferFactory.getTransfer() everywhere. I have the following bean > definitions for transfer > > <beans> > > <bean id="transferConfiguration" > class="transfer.com.config.Configuration"> > <constructor-arg > name="datasourcePath"><value>/config/transfer/Datasource.xml</value></constructor-arg> > <constructor-arg > name="configPath"><value>/config/transfer/Transfer.xml</value></constructor-arg> > <constructor-arg > name="definitionPath"><value>/model/data</value></constructor-arg> > </bean> > > <bean id="transferFactory" class="transfer.TransferFactory"> > <constructor-arg name="configuration"><ref > bean="transferConfiguration" /></constructor-arg> > </bean> > > <bean id="transfer" class="transfer.com.Transfer" > factory-bean="transferFactory" > factory-method="getTransfer"> > </bean> > > </beans> > > Is that a reasonable way to go ? > > cheers, Chris > > > > -- Paul Marcotte Fancy Bread - in the heart or in the head? http://www.fancybread.com --~--~---------~--~----~------------~-------~--~----~ Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en -~----------~----~----~----~------~----~------~--~---
