http://qs1969.pair.com?node_id=934703


in reply to Re: Tomcat, CGI scripts and DBI connection persistence
in thread Tomcat, CGI scripts and DBI connection persistence

After reading the docs of Apache::DBI I thought that this is .. in fact , possible. Are you sure they can't span a process's lifespan ?

Replies are listed 'Best First'.
Re^3: Tomcat, CGI scripts and DBI connection persistence
by afoken (Chancellor) on Nov 01, 2011 at 09:57 UTC

    Apache::DBI is used in combination with mod_perl. It maintains a pool of DBI connections inside each Apache process, that can be used by Perl code executed by mod_perl, still inside the Apache process.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^3: Tomcat, CGI scripts and DBI connection persistence
by ikegami (Patriarch) on Nov 01, 2011 at 20:37 UTC

    Perl code executed by mod_perl is executed in a Perl interpreter in the Apache process. The interpreter is created when apache starts up and it persists on until the apache child exits.

    While the db connection is still limited to a process -- each apache process has its own pool -- that process can handle more than one HTTP request.