Second that.  We've implemented centralized database access via the
Application object as well, and were planning on adding pooling support, but
now I'll most likely be switching our system over to Ken's patch.  We
require central database access for a content scheduling system, which
manages content for the servlets.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ken
Lalonde
Sent: Wednesday, October 24, 2001 10:47 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Webware-discuss] A few patches


Thanks for your comments, Clark.

I'd argue for putting Application.getDbConnection() in the core
as follows:
- putting it in SitePage makes it inaccessible
  to code that doesn't subclass SitePage.
  For example, I keep WebKit session data in a postgresql database,
  and the code to implement that is unrelated to SitePage.
  The pool is logically part of the application, not the Page servlet.
- cleaning up DB connections at exit time is more awkward
  when subclassing SitePage.  I guess you can do it with atexit,
  but it's messy, and some people won't bother.
- it took me a little fiddling around to figure out the best way
  to do pooling connections, and I imagine others will
  waste time reinventing the same thing.
  Providing an application-wide connection pool with proper
  cleanup at exit fills a very common developer need,
  and is appropriate for the core.

> From: "Clark C . Evans" <[EMAIL PROTECTED]>
> To: Ken Lalonde <[EMAIL PROTECTED]>
> Subject: Re: [Webware-discuss] A few patches
>
> Ken Lalonde wrote:
> | * WebKit/Application.py:
> |     New method: getDbConnection()
>
> This is interesting, but I'm not sure that it should
> be added to the core of WebKit since it is certainly
> easy enough to add in one's SitePage.py
>
> Your other changes sound good.

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss



_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to