Re: Closing DB handler with PerlCleanupHandler

[prev] [thread] [next] [Date index for 2004/11/10]

From: Stas Bekman
Subject: Re: Closing DB handler with PerlCleanupHandler
Date: 02:46 on 10 Nov 2004
Batara Kesuma wrote:
> Hi,
> 
> How can I pass $dbh value from PerlResponseHandler to PerlCleanupHandler
> to be disconnected? My scripts are running in ModPerl::Registry, and I
> don't want to do $dbh->disconnect() at the end of every scripts. So I
> try to write a module in PerlCleanupHandler to clean up the DB handler
> at the end of every request. 

1) use Apache::DBI

2) if not, refer to:
http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlCleanupHandler
http://perl.apache.org/docs/2.0/user/coding/coding.html#Getting_the_C__r__Object

        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Closing DB handler with PerlCleanupHandler
Batara Kesuma 02:47 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Stas Bekman 02:46 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Batara Kesuma 03:51 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Stas Bekman 04:07 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Perrin Harkins 06:47 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Batara Kesuma 07:37 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Timour Ezeev 15:27 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Perrin Harkins 20:30 on 10 Nov 2004

Re: Closing DB handler with PerlCleanupHandler
Glenn Strauss 08:41 on 10 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52