Hi all,
I just wondered if/how it might be possible to lazily set properties.
Scenario:
<bean id="A" class="test.A">
<property name="foo">
<ref local="B"/>
</property>
</bean>
<bean id="B" class="test.B" lazy-init="true">
</bean>
If A is retrieved from the bean factory, B will be instantiated as well.
Is it somehow possible to assign some kind of lazy proxy for the "foo" property which resolves an actual instance of B on first access?
I already thought of using TargetSource but didn't find a working solution yet.
Any help would be appreciated.
Regards,
Andreas


Reply With Quote
