Dynamic constructor argument
I have been using spring for a while and am very happy with the result but I have now bumped into a problem that I am struggling to solve.
I would like to be able to get a bean from the bean factory that is not a singleton and is passed in a dynamic constructor argument. I would like to use the factory so that I can swap out different implementations of the bean. Conceptually I would like to produce the same result as the following fictious method.
MyObject = context.getBean("someId", DynamicRuntimeConstructorArgs);
I have had a good look at the docs and the code but I have thus far failed to find any means of doing this. Any help would be most appreciated.
Beans with dynamic constructor arguments
I'm just a Spring user, so what do I know, but you probably should enter an issue in the Spring Jira. http://opensource.atlassian.com/proj...Dashboard.jspa
One point with the name of method, why not just: Object getBean(String name,BeanArguments arguments) throws BeansException;
You may also want to check with the sourceforge forums for archives on this topic before beginning any effort. For example, this response: http://sourceforge.net/forum/message.php?msg_id=2693161
-- J. Betancourt