I'm about to introduce Spring into our existing framework, of which there's a lot of existing code. This already does a lot of IoC type stuff, but with dependency lookup, instead of injection. The aim of the game is to bit-by-bit replace our own IoC with Spring's, leveraging the dependency injection.
What's the best approach to using Spring bean factories and the assoicated resources in a legacy framework? Holding references to factories seems to be the main issue.
Despite the warnings in the JavaDoc, the best approach seems to be to use SingletonBeanFactoryLocator. Our app consists of lots of modules, with a strictly-defined dependency hierarchy. By using SingletonBeanFactoryLocator as the access point for components created from Spring resources, this seems to give the best way of associate disparate beans.xml config files between modules that may depend on each other.
Unless there's another way?