dependency injection question from factory-method
If a bean is using setter based DI for a particular attribute and the attribute ref is to a factory-method that has a scope of 'request', will that factory-method be called each time the bean is used or will the factory-method be called only once when the bean is initialized at context startup?
Code:
<!--bean id="fooBean"
scope="request"
factory-bean="someFactoryBean"
factory-method="getObject">
</bean-->
<bean id="someController"
<property name="foo" ref="fooBean" />
......
</bean>
So I would expect that the fooBean.getObject() would be called for each new invocation of someController within a Request but I do not see that happening. It appears as though foo is set on someController only once (at the Bean Container startup).
Am I expecting the wrong behavior?