perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Leonard II" <john.leon...@ce.gatech.edu>
Subject Application object and DB handle
Date Fri, 22 Jun 2001 03:21:11 GMT
All:

I use DBI and PostgresSQL on Apache 1.3.20, mod_perl 1.25, and Apache::ASP
2.17.

What is the "best" way to create and dispose of DB handles?  Are there
implementation or performance gotcha's between the following alternatives:

A) Should I create and destroy a single global variable (e.g., $dbh) in the
Application_OnStart and _OnEnd.

B) Should each $Session create and destroy it's own DB handle stored in the
$Session object?

C) Should each script create and destroy it's own handle in the
Script_OnStart and _OnEnd?

D) Should I use the approach offered by Apache::DBI?

Thanks!

JL
------
John D. Leonard II, Associate Professor            Phone: 404/894-2360
School of Civil and Environmental Engineering       FAX:  404/894-2278
Georgia Institute of Technology           http://traffic.ce.gatech.edu
Atlanta, GA  30332-0355              mailto:john.leonard@ce.gatech.edu


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message