Re: Apache pre-forking
[prev]
[thread]
[next]
[Date index for 2004/08/03]
On Mon, 2004-08-02 at 20:06, jason scott gessner wrote:
> The real problem with this setup is that if you wish to use different
> connections with the same base class (think development vs. staging, or
> clientA vs. clientB) then you must manually issue a new connection (even
> though apache::DBI will have cached it if applicable).
Well, that is a problem, but it's a different problem. What you're
talking about is more of a configuration issue. That's separate from
persistent connections playing well with mod_perl.
> When i tried overriding db_Main() in my base class, my code only talked
> to the proper database if in every request in the scope of a given
> virtual host I told it to use the right database. This is a total drag.
That interface doesn't sound too bad to me. How else would it know
which database you wanted for a particular request? The question is
whether or not switching databases out from under Ima::DBI will cause it
to do extra work regenerating closures for prepared statements.
- Perrin