|
From: Rod J. <rod...@in...> - 2003-09-02 06:47:41
|
Is anyone using, or does anyone have suggestions as to how to improve, the BeanFactoryBootstrap class (in beans.factory.support)? I'm inclined to demote it to the sandbox, unless it can be made significantly more useful. The motivation was to provide a generic way of configuring a BeanFactory on those occasions when a BeanFactory had to be loaded as a singleton. It works by looking at System properties to find a bean definition called "bootstrapBeanFactory". The problem with this is that most BeanFactory implementations, like the XmlBeanFactory, are not JavaBeans, and hence can't easily be configured themselves via a BeanFactory. I did also once consider supporting alternative sources of properties--properties file on classpath etc--that could be searched in a documented order. Is this a potentially useful piece of functionality that we should get right? Or should we just leave users to write their own custom singletons if they really need to bootstrap via a Singleton rather than a J2EE hook like ServletContext? Regards, Rod |