And while you're at it, you may want to add:
<bean id="TDOBeanInjectorObserver"
class="path.to.TDOBeanInjectorObserver" lazy-init="false">
<constructor-arg name="transfer"><ref bean="transfer"
/></constructor-arg>
<constructor-arg
name="afterCreateMethod"><value>Setup</value></constructor-arg>
<property name="beanInjector">
<ref bean="beanInjector" />
</property>
</bean>
<bean id="beanInjector" class="path.to.BeanInjector">
<constructor-arg
name="debugMode"><value>false</value></constructor-arg>
</bean>
Which will allow your Transfer Objects to be autowired via Brian's
BeanInjector (http://coldspringutils.riaforge.org/). It may seem a
bit complicated at first, but you'll probably find you need it
eventually.
Bob
On Wed, Nov 19, 2008 at 4:07 PM, Paul Marcotte <[EMAIL PROTECTED]> wrote:
> 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
>
> >
>
--
Bob Silverberg
www.silverwareconsulting.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
-~----------~----~----~----~------~----~------~--~---