Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 88247 invoked from network); 9 Dec 2009 17:14:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Dec 2009 17:14:03 -0000 Received: (qmail 73709 invoked by uid 500); 9 Dec 2009 17:13:59 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 73671 invoked by uid 500); 9 Dec 2009 17:13:59 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 73660 invoked by uid 99); 9 Dec 2009 17:13:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 17:13:59 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anuragkapur@gmail.com designates 72.14.220.158 as permitted sender) Received: from [72.14.220.158] (HELO fg-out-1718.google.com) (72.14.220.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Dec 2009 17:13:56 +0000 Received: by fg-out-1718.google.com with SMTP id e12so173129fga.0 for ; Wed, 09 Dec 2009 09:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=9K1su80JFrYYgZL4j2zjAUvqffCfE7l/dv5yatRdfkA=; b=SnByYk9rUZvzDy7jE9GmDmBQh607aVIM872Xb8cEnmNDcI471zDHUFNv/+8Fl4q3yt wh0LNh+nk2JUwulAOGKgRvMNJGHFTYNSu61HXCT4ljUtk6269GnCAjwyIPgNevd8j5M6 W1b7Xe2qPdBkwwADPudnu5JviUvziRDoTn204= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=HXMfM3xHg+zZ+jq0dM8aCNcX85uWAAmkQ5WO4whzYP8J3TTr2+Fs5pbF++rSYVybzQ JbTpk4mMgG45JXppw1UbUmiq89N8mGhTwSLIwtNe7tTQB/ZzeZyvSBcMQynseLcxPJNP yTbmq6FSamydEGmCTv8vzgAjuoPJTYLlObsD0= MIME-Version: 1.0 Received: by 10.239.139.100 with SMTP id s36mr1042644hbs.109.1260378815243; Wed, 09 Dec 2009 09:13:35 -0800 (PST) Date: Wed, 9 Dec 2009 17:13:35 +0000 Message-ID: <2fb267f80912090913uba5aa4eq61a78d520003e39a@mail.gmail.com> Subject: Data Source Resource Declaration in Tomcat Context From: Anurag Kapur To: Tomcat Users List Cc: "Kapur, Anurag" Content-Type: multipart/alternative; boundary=001485f5ebb690a5b9047a4ecf52 --001485f5ebb690a5b9047a4ecf52 Content-Type: text/plain; charset=ISO-8859-1 Tomcat version: 5.5.27 Java version: 1.5.0_14-b03 I have a datasource configured in global context (via present in [tomcat_home]/conf/context.xml) as follows: Resource name=*"@tomcat.context.ece.read.ds.resource@"* auth=*"Container" type="@tomcat.context.driver.type@" driverClassName= "@tomcat.context.driver.class@" url="@tomcat.context.db.url@" connectionProperties= "{ValidateConnection=@tomcat.context.validate.connection@ ,ConnectionWaitTimeout=@tomcat.context.connection.wait.timeout@}" username= "@tomcat.context.db.user@" password="@tomcat.context.db.password@" validationQuery="@tomcat.context.validation.query@" initialSize= "@tomcat.context.initial.size@" minIdle="@tomcat.context.min.idle@" maxActive="@tomcat.context.max.active@" maxIdle="@tomcat.context.max.idle@" maxWait="@tomcat.context.max.wait@" removeAbandonedTimeout="60" removeAbandoned="true" logAbandoned="true"/>* I know a DS defined as above is visible across all the contexts defined in the container. What I want to know is whether the data source is created for "each" context or is it "shared" across all the available contexts? I need to know this because if it is duplicated and not shared and the data source establishes say 5 connections with the DB, it would mean that the total connections to the DB would be 5 * number of contexts defined in the container. Thus to estimate the number of DB connections this information is needed. Any help appreciated. Regards ------------------------------------------------------------------ Anurag Kapur Associate - Technology, Sapient Corporation. http://www.linkedin.com/in/anuragkapur http://www.google.com/profiles/anuragkapur ------------------------------------------------------------------ --001485f5ebb690a5b9047a4ecf52--