From: Martin C. <mus...@us...> - 2003-02-05 15:54:49
|
Ok I'm not entirely done my conversation here, but obviously the timezone difference has put me behind;) I'm not sure if I "totally" like the idea of again putting this on the web application shoulders. The ServletConfiguration should run as an individual monitor application separte from the applications, and support all instances of proxool. I have an idea how this could work, but it's a bit complex so really comments are welcome, and please bare with me, I haven't had my morning coffee. Could we make the proxool distribution for web containters in two parts (or actually three). The first distribution would be a lean and mean "controller" distribution that sits in the commons. All it would do is handle registration/deregistration of new pools, manage pools for the same connection across applications, support redirecting configuration to the individual pools, and of course manage starting them up/shutting them down. The implementation goals would *have to be* that: a) We keep this controller lean and mean (i.e. the less features the better) b) remove all external dependencies c) be extremely careful of the method calls made to registered proxool pools, to support backward compatibility in the future and avoid MethodNotFoundExceptions. The second distribution is just your standard proxool package, which also now has the ability to recognise and register with the controller. The commons-logging, and JDBC driver would be deployed here. The third distribution would be your ServletConfiguration WAR, which uses the controller to inspect the various running pools. Eeek... perhaps a little too complex. I can already see flaws as I re-read this too. But this would give yor WARs complete independence from the proxool code. Also the managing of all pools from a single Servlet is powerful (didn't Bill suggest making proxool one day a fail-over solution;) Two other feedbacks from previous posts: - DataSource is a Good Thing (tm) - Refactor logging code a Good Thing Too (unregistered) Ok, I've done make wild and crazy suggestions. Back to my DocBook... Martin On Wed, 2003-02-05 at 10:14, Bill Horsman wrote: > On Wed, 2003-02-05 at 14:57, Christian Nedregaard wrote: > > > Or maybe just use the ServletConfigurator servlet Bill is writing for 0.7. > > And I've just committed it. This was Andrew Budarevsky's idea. To > configure Proxool and to get it to shutdown correctly you just need to > add something like this to your web.xml: > > <servlet> > <servlet-name>ServletConfigurator</servlet-name> > <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class> > <init-param> > <param-name>xmlFile</param-name> > <param-value>WEB-INF/proxool.xml</param-value> > </init-param> > </servlet> > > If, for any reason, you don't want it to autoShutdown you can add: > > <init-param> > <param-name>autoShutdown</param-name> > <param-value>false</param-value> > </init-param> > > I'm going to be busy documenting the conclusions (?) from these > discussions now :( I'll post something on > http://proxool.sourceforge.net/dev (which is where I put draft > documentation prior to a release). |