Hi -
When I am creating a bean via instance factory method, can I specify in the xml an argument for "factory-method" ? e.g. in the following snippet, can I specify that my factory method createInstance() takes an argument which determines the exact type of bean instantiated.
<!-- The factory bean, which contains a method called <literal>createInstance()</literal> -->
<bean id="myFactoryBean" class="...">
...
</bean>
<!-- The bean to be created via the factory bean -->
<bean id="exampleBean"
factory-bean="myFactoryBean"
factory-method="createInstance"/>
This is useful if the factory creates a polymorphic type, where the actual type instantiated will depend on this argument.
Please help.
- Debasish


Reply With Quote
