Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 93864 invoked from network); 19 Jan 2007 05:19:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jan 2007 05:19:59 -0000 Received: (qmail 3747 invoked by uid 500); 19 Jan 2007 05:20:01 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 3693 invoked by uid 500); 19 Jan 2007 05:20:01 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 3682 invoked by uid 99); 19 Jan 2007 05:20:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 21:20:01 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: 204.127.192.83 is neither permitted nor denied by domain of cyclopsgroup@gmail.com) Received: from [204.127.192.83] (HELO rwcrmhc13.comcast.net) (204.127.192.83) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jan 2007 21:19:50 -0800 Received: from [192.168.1.100] (c-24-16-117-99.hsd1.wa.comcast.net[24.16.117.99]) by comcast.net (rwcrmhc13) with ESMTP id <20070119051929m13006hob4e>; Fri, 19 Jan 2007 05:19:29 +0000 Message-ID: <45B054EE.5020507@gmail.com> Date: Thu, 18 Jan 2007 21:19:42 -0800 From: Jiaqi Guo Reply-To: jiaqi.guo@gmail.com User-Agent: Thunderbird 1.5.0.9 (X11/20070104) MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: Connection sharing question References: <45AF80D7.8060605@gdcjk.com> In-Reply-To: <45AF80D7.8060605@gdcjk.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Garth Keesler wrote: > The more I read, the less sure I am of what I know... :-) > > Is it true that DBCP running with Tomcat provides sharing of database > connections across separate invocations of different web services (on > the same Tomcat server) that use the same database? > > Thanx, > Garth > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > http://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat is a document for configuring JIRA and a good example of how a global DBCP DataSource is defined in Tomcat. Basically you can declare it in Tomcat server.xml, refer it in web.xml and get the DataSource in code through JNDI. Make sure to put the commons-jdbc and JDBC driver jar file into /common/lib rather than /WEB-INF/lib. Hope it helps. Good luck. Regards -- Jiaqi Guo http://www.cyclopsgroup.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org