Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DF5C849FD for ; Mon, 27 Jun 2011 20:10:56 +0000 (UTC) Received: (qmail 63331 invoked by uid 500); 27 Jun 2011 20:10:55 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 63271 invoked by uid 500); 27 Jun 2011 20:10:55 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 63264 invoked by uid 99); 27 Jun 2011 20:10:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jun 2011 20:10:54 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 207.173.203.201 is neither permitted nor denied by domain of david@kineticode.com) Received: from [207.173.203.201] (HELO smtp.kineticode.com) (207.173.203.201) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Jun 2011 20:10:47 +0000 Received: from [10.16.6.81] (dv-fw-a-nat.iovation.com [74.121.28.6]) by smtp.kineticode.com (Postfix) with ESMTPSA id 958C6508349; Mon, 27 Jun 2011 13:10:26 -0700 (PDT) Subject: Re: How do you use mod_perl for your web application? Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "David E. Wheeler" X-Priority: 3 In-Reply-To: Date: Mon, 27 Jun 2011 13:10:25 -0700 Cc: "Fred Moyer" , , "mod_perl list" Content-Transfer-Encoding: 7bit Message-Id: References: <4E07CA98.29249.1B161F@randolf.modperl.pl><5886A750117D4EA9B9AD015BB89131FD@octavian> To: Octavian Rasnita X-Mailer: Apple Mail (2.1084) On Jun 27, 2011, at 12:53 PM, Octavian Rasnita wrote: > DBIx::Class already manages its connections for you, and therefore it > cannot benefit from Apache::DBI under any scenario. It makes one > connection per-process, and keeps that connection persistent, > reconnecting only if the connection appears to have died, or if you > fork/thread over to another process/thread-id. The only Apache::DBI > issue in DBIx::Class is that Apache::DBI will actually thwart > DBIx::Class's connection management code, and cause it to use the same > (and invalid) connection in a new process, in cases such as (as > mentioned above) if you make a DBI connection before forking in a > prefork mod_perl server. > > To work around this, DBIx::Class has specific code in it to work > around Apache::DBI, nullifying the effects of Apache::DBI on > DBIx::Class. Essentially, loading Apache::DBI should change nothing > and be rather pointless under DBIx::Class. > > The only reason we support it (support working around it) is because > someone might want Apache::DBI loaded up under the same mod_perl as a > DBIx::Class application to support a different legacy application > which does not use DBIx::Class, in which case they share a perl > interpreter and will both have the same set of modules loaded. The same statements apply to DBIx::Connector, FWIW. Best, David