Sven Geisler wrote:
Hi Ben,

Do you use Apache::DBI?
I mean yes because you're using connect_on_init.

Apache::DBI do not really close your DBI connection. You will get the
same connection with the same connection parameters, when you call
DBI->connect. All connections are cached by Apache::DBI.

Yes, you should call DBI->connect.

Each sub process will get it's own connections.
What Sven said, plus it helps to RTFM before asking the list. Please read:
http://perl.apache.org/docs/1.0/guide/databases.html#Apache__DBI___Initiate_a_persistent_database_connection

Am Mon, 2003-01-13 um 13.08 schrieb Ben Wrigley:

Hi All,

I'm a mod_perl newbie and just trying to understand a little more about the startup.pl files and prespawning databases.
I am using the connect_on_init routine in the startup.pl which is fine.

What I'm not sure is then how to use this most economically in my scripts.
It seems that in the scripts you should call the DBI->connect again, but that seems to be bypassing the connection I made at startup or am I misunderstanding completely.

Thanks for your help

Ben


--


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to