|
From: Colin S. <col...@ex...> - 2003-09-16 14:41:37
|
How about I modify StaticListableBeanFactory, so it can optionally be constructed with the HashMap access being synchronized, and create an accessor class which returns a singleton instance of StaticListableBeanFactory? Rod Johnson wrote: >Colin, > >If you want to implement such an approach, please do and submit it for >discussion, along with how you're using it. > >Regards, >Rod > >----- Original Message ----- >From: "Colin Sampaleanu" <col...@ex...> >To: "jürgen höller [werk3AT]" <jue...@we...> >Cc: <spr...@li...> >Sent: Tuesday, September 16, 2003 2:45 PM >Subject: Re: [Springframework-developer] SimpleNamingContext should be >usable with other providers around > > > > >>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... > > |