|
From: Rob B. <rob...@ve...> - 2003-11-19 01:36:32
|
Dmitriy, Yes I saw that, and i saw the ListableBeanFactory too. But these are not supported in the WebApplicationContext. It doesn't appear as if you can swap the bean factory used by the available ApplicationContexts (In spring M2 anyways) (ContextLoaderServlet or ContextLoaderListener) calls ContextLoader init.... ContextLoader init allows for the WebApplicationContext to be changed by passing a parameter from web.xml - this is good. However, there are only StaticWebApplicationContext (which should be used for testing only - not in production as stated in the javadoc) and the FileSystemXmlApplicationContext, ClassPathXmlApplicationContext, and XmlWebApplicationContext all of which inherit from AbstractXmlApplicationContext. AbstractXmlApplicationContext only uses a XmlBeanFactory and cannot be changed to use a different one. Thus, there is no WebApplicationContext that ContextLoader can use which supports ListableBeanFactory, or JdbcBeanFactory provided in Spring. Later Rob ----- Original Message ----- From: "Kopylenko, Dmitry" <dko...@ac...> To: "'Rob Butler '" <rob...@ve...>; <spr...@li...> Sent: Tuesday, November 18, 2003 8:00 PM Subject: RE: [Springframework-developer] no ListableWebApplicationContext? > Rob, > > there is a JdbcBeanFactory implementation already available. Check it out: > http://www.springframework.org/docs/api/org/springframework/jdbc/core/suppor > t/JdbcBeanFactory.html > > Regards, > Dmitriy. > > -----Original Message----- > From: Rob Butler > To: spr...@li... > Sent: 11/18/2003 7:43 PM > Subject: [Springframework-developer] no ListableWebApplicationContext? > > Hello all, > > I was looking over the Spring code and it doesn't appear as if there is > support for a ListableWebApplicationContext. i.e. a > WebApplicationContext > that uses property files instead of XML. Shouldn't this be added to the > framework? > > The ContextLoader already supports using a parameter to select a > different > WebApplicationContext implementation, so adding > ListableWebApplicationContext support shouldn't be too difficult. It > would > be nice if the ContextLoader were modified to try the > XmlWebApplicationContext first, and if that is not found to try the > ListableWebApplicationContext. In that way if either of the two Spring > provided WebApplicationContexts were used they would be found > automatically. > > I would like ListableWebApplicationContext support because I plan on > holding > my configuration data in a database and then have the database generate > the > property files. It's easier to have the database write out property > files > than XML. At the moment I don't want the properties obtained directly > from > the database. But, now that I mention it, JdbcWebApplicationContext > support > should be added to the framework too, just to be complete. > > Why would I want to do any of this? Ah, that is the subject of a future > e-mail... More to come. > > Later > Rob > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |