Folks, I will try to explain the situation as best as I could. Can you have nested beanFactories e.g.<bean id="AppManagerFactory" class="com.AppManagerFactory" /> <bean id="Manager1" factory-bean="AppManagerFactory" factory-method="createManager"> <constructor-arg name="manager"> <value>Manager1</value> </constructor-arg> <constructor-arg name="reactor"> <ref bean="ReactorFactory"/> </constructor-arg> </bean>
Are you trying to pass the ReactorFactory to your AppManagerFactory.createManager(...) call, or inject it into the "Manager1"? In your code you are trying to pass reactor to your factory-method. It would be easier to help if we saw the code of your custom factory.
Also, can I pass the ColdSpring bean factory as a constructor arguments. So if one of those Service Object require another service object, I can call coldspringfactory.getBean().
The point of dependency injection is so you don't have to do that. Why not just pass the bean you need in? The answer is yes, however. If you have a setBeanFactory(..) method that accepts an argument of type "coldspring.beans.BeanFactory", ColdSpring will inject the current BeanFactory into your bean. Does that help? thanks, Dave
Thanks, Qasim
