Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Tomcat, CGI scripts and DBI connection persistence

by ikegami (Patriarch)
on Oct 29, 2011 at 19:57 UTC ( [id://934640]=note: print w/replies, xml ) Need Help??


in reply to Tomcat, CGI scripts and DBI connection persistence

DB connections cannot survive a process's lifespan. I really don't know anything about Tomcat, but I don't see anything about a persistent Perl interpreter (i.e. one that survives more than one request).

Replies are listed 'Best First'.
Re^2: Tomcat, CGI scripts and DBI connection persistence
by spx2 (Deacon) on Oct 30, 2011 at 11:07 UTC
    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 ?

      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". ;-)

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://934640]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-03-29 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found