You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by firingme <fi...@gmail.com> on 2005/09/12 07:12:40 UTC

How to use DB Connection Pool in mod_perl2 ?

I want to know is there any package can give me a DB Connection Pool
in a mod_perl application ?

I've checked Apache::DBI, but it seems that it'll initialze a
new connection when a new thread born. 




Re: How to use DB Connection Pool in mod_perl2 ?

Posted by Nick Kew <ni...@webthing.com>.
On Monday 12 September 2005 06:12, firingme wrote:
> I want to know is there any package can give me a DB Connection Pool
> in a mod_perl application ?
>
> I've checked Apache::DBI, but it seems that it'll initialze a
> new connection when a new thread born.

It's a long time since I've touched mod_perl, so I can only speculate
about it.

But Perl's DBI has been around a lot longer than Apache's DBD framework,
and it may be that mod_perl has not yet any mechanism for using the latter.
If so, the most useful solution for mod_perl would be to provide some means
of using Apache DBD, either through Perl's own DBI or separately.  It would
need to use the API functions exported by mod_dbd, as this is the layer at
which connection pooling (for threaded MPMs) is implemented.

Perl has a distinguished track record in this field, being the pioneer both of
the DBI/DBD architecture and of the persistent connection that is the
fundamental pillar of LAMP.  I'm sure it can't be too long before they get
connection pooling!

-- 
Nick Kew