Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 43183 invoked from network); 2 Dec 2005 10:16:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Dec 2005 10:16:10 -0000 Received: (qmail 30383 invoked by uid 500); 2 Dec 2005 10:16:09 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 30364 invoked by uid 500); 2 Dec 2005 10:16:09 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 30351 invoked by uid 99); 2 Dec 2005 10:16:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2005 02:16:08 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [61.95.200.204] (HELO mail2.world2web.com) (61.95.200.204) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 02 Dec 2005 02:17:37 -0800 Received: (qmail 1976 invoked from network); 2 Dec 2005 15:46:53 +0530 Received: from unknown (HELO polaris) (192.168.0.69) by 192.168.0.1 with SMTP; 2 Dec 2005 15:46:53 +0530 Reply-To: From: "Anuradha S.Athreya" To: Subject: Creating common connection pool Date: Fri, 2 Dec 2005 15:50:47 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0078_01C5F758.29AEC730" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Thread-Index: AcX3Kg/qPZdLN6E/SjWWlWxV2o46KQ== X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20051202101738.1B19510FB011@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0078_01C5F758.29AEC730 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I am trying to configure connection pooling using Torque for 2 web applications deployed in the same tomcat container but in 2 different contexts,connecting to the same DB. Doubt 1: Where should the Torque.properties file be located? Obviously, the path of this file has to be with reference to a servlet context. Since I want to create a common connection, which one of the 2 servlet context will contain the properties file? I made changes to the Tomcat server.xml file : factory org.apache.torque.dsfactory.JndiDataSourceFactory url jdbc:mysql://localhost/myApp1DB driverClassNamecom.mysql.jdbc.Driver username myApp1 password myApp1 maxWait 30000 maxIdle 100 maxActive 10 Under normal circumstances, since i place the war files of the application, I dont specify the CONTEXT explicitly in the server.xml file. But since. I need to place RESOURCE, here I added the CONTEXT tag. Since, I have 2 web applications deployed, will I have to repeat the CONTEXT tag again for my 'myApp2'?? I have also made changes to the Tomcat web.xml file.. Added: DB Connection jdbc/instacoll javax.sql.DataSource Container Next comes the connection part.... Will Tomcat itself perform Torque.init()? If not, where should this be done, so that the Torque initialisation happens common to both the applications?? ------=_NextPart_000_0078_01C5F758.29AEC730--