Re: CDBI and mod_perl

[prev] [thread] [next] [Date index for 2005/02/18]

From: Perrin Harkins
Subject: Re: CDBI and mod_perl
Date: 22:36 on 18 Feb 2005
On Fri, 2005-02-18 at 22:12 +0000, Tony Bowden wrote:
> On Tue, Feb 15, 2005 at 10:33:57PM +0000, Tim Bunce wrote:
> > Isn't there some way that Class::DBI could just do-the-right-thing here
> > by detecting that it's running under Apache and install a callback into
> > Apache that'll trigger the disconnect before the fork?
> 
> I'm relatively uncomfortable with doing this.
> 
> Theoretically, it doesn't seem to me that Class::DBI should care about
> something like this at all.
> 
> And, more practically, I know next to nothing about this sort of thing,
> and don't necessarily want to, either!
> 
> I will however happily support factoring things out better if required
> so that someone can write some sort of plug-in or add-on or whatever
> that does this.

I didn't respond to this yet because the issues are complex and have
changed a bit over time.  I need to take a few minutes and look into it
to make sure I'm not spreading misinformation.  However, I *think* that
as it stands now you are safe if you use something like the db_Main
override that I showed earlier (and that is now on the wiki).  If you
don't do that, the closure created by Ima::DBI will cause problems.  I'm
not sure this can be fixed without either making Ima::DBI mod_perl aware
or overriding it.  Something has to tell Ima::DBI when to keep the
handle and when not too.

In general, Class::DBI doesn't share database handles with other things
very nicely, and I think maybe it should.  Another big sticking point
besides the database closure stuff is that the required subclassing of
DBI handles makes it hard to share them with other things.  I'm not sure
what to do about that at the moment.  Maybe if DBIx::ContextualFetch
used a "has a" rather than an "is a" relationship to DBI handles, i.e.
acting as a proxy?  That would probably be slower though.

- Perrin

(message missing)

Column Names
Justin Tocci 05:19 on 10 Feb 2005

Re: Column Names
Peter Speltz 20:36 on 10 Feb 2005

Re: Column Names
Rod McChesney 20:56 on 10 Feb 2005

CDBI and mod_perl
Rod McChesney 20:58 on 10 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 21:37 on 10 Feb 2005

Re: CDBI and mod_perl
Drew Wilson 21:54 on 10 Feb 2005

Re: CDBI and mod_perl
karjala_lists 13:59 on 15 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 22:16 on 10 Feb 2005

Re: CDBI and mod_perl
Drew Wilson 22:27 on 10 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 22:46 on 10 Feb 2005

Re: CDBI and mod_perl
Edward J. Sabol 23:42 on 10 Feb 2005

Re: CDBI and mod_perl
Rod McChesney 01:55 on 12 Feb 2005

Re: CDBI and mod_perl
Edward J. Sabol 19:43 on 12 Feb 2005

Re: CDBI and mod_perl
Rod McChesney 18:48 on 14 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 21:23 on 14 Feb 2005

Re: CDBI and mod_perl
Edward J. Sabol 06:53 on 14 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 21:14 on 14 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 19:59 on 15 Feb 2005

Re: CDBI and mod_perl
Tim Bunce 22:33 on 15 Feb 2005

Re: CDBI and mod_perl
Tony Bowden 22:12 on 18 Feb 2005

Re: CDBI and mod_perl
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 22:19 on 18 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 22:36 on 18 Feb 2005

Re: CDBI and mod_perl
Tony Bowden 11:23 on 19 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 13:56 on 19 Feb 2005

Re: CDBI and mod_perl
Tony Bowden 15:57 on 19 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 16:21 on 19 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 16:24 on 19 Feb 2005

Re: CDBI and mod_perl
Tony Bowden 09:54 on 20 Feb 2005

Re: CDBI and mod_perl
Perrin Harkins 21:31 on 20 Feb 2005

Re: CDBI and mod_perl
Tony Bowden 22:19 on 20 Feb 2005

Generated at 12:48 on 22 Feb 2005 by mariachi v0.52