|
From: Colin S. <col...@ex...> - 2003-09-16 13:45:44
|
jürgen höller [werk3AT] wrote: >Let's factor out the anonymous inner class from SimpleNamingContextBuilder.createInitialContextFactory to a separate SimpleNamingContextFactory class. This should allow for using it in the way you intended. > >Using a singleton bean factory should work too. You could also implement your own custom singleton that loads whatever BeanFactory type you need. > > I was being lazy. Easiest thing for me to do is just create a singleton that returns an instance of StaticSingletonBeanFactory. But I think a class like this (similar to BeanFactoryBootstrap except it would return StaticSingletonBeanFactory) would be handy to have built-in. And for the record, I am not trying to subvert IOC here :-). What I actually want to do (which I will get to in another message) is link up several ApplicationContext instances which are loaded in different layers, and I need a place to store them temporarilly as they get created... |