Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A915BEB01 for ; Mon, 25 Feb 2013 08:53:25 +0000 (UTC) Received: (qmail 57385 invoked by uid 500); 25 Feb 2013 08:53:22 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 57124 invoked by uid 500); 25 Feb 2013 08:53:21 -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 57069 invoked by uid 99); 25 Feb 2013 08:53:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 08:53:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jruohone@gmail.com designates 209.85.217.177 as permitted sender) Received: from [209.85.217.177] (HELO mail-lb0-f177.google.com) (209.85.217.177) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 08:53:09 +0000 Received: by mail-lb0-f177.google.com with SMTP id go11so2020134lbb.8 for ; Mon, 25 Feb 2013 00:52:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:date:from:to:subject:message-id:reply-to :mail-followup-to:mime-version:content-type:content-disposition :user-agent; bh=7PGCJZhnVhWJFAwrs2c6gadFYu+TT9ituFmbsDdN8+w=; b=nNRFZ25pNCO8jXp4YC3TUAznAFpV/tZgjYCnOaBZ3Vcy2Bts8DyzSQfFgru/GMIJyf fNbhp0rDJ4GMhVcRl0f3Ghv0HHxaDNFTdHPdXixel8YCqucGIdygL94lseTXU8x/kBKA ZWMr1W7RCY4Gajkbx1bLQKMY9HKFk8hFvsjIixbPOxH/FchzxpmwB1yj/GLfUBQudmL2 p+PJb0HE6GGgbYPaopzEdPnARh0bbzTIFR6+PaaS6Fuojw3p8fg/6FecibT2AP0BIc5G ktWsqQifakgglH9A+ZntAEq1SL74elUR69cYI/Mb/MaJ9LsimPDGgT/5u7QIv6PX6DmX nnsg== X-Received: by 10.112.84.228 with SMTP id c4mr4038644lbz.113.1361782368902; Mon, 25 Feb 2013 00:52:48 -0800 (PST) Received: from marx.bitnet (xdsl-83-150-88-127.nebulazone.fi. [83.150.88.127]) by mx.google.com with ESMTPS id hk10sm6426859lab.4.2013.02.25.00.52.47 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Feb 2013 00:52:47 -0800 (PST) Sender: a b Received: by marx.bitnet (Postfix, from userid 1000) id 7DD9756BD; Mon, 25 Feb 2013 10:52:44 +0200 (EET) Date: Mon, 25 Feb 2013 10:52:44 +0200 From: Jukka Ruohonen To: Tomcat Users List Subject: A pool question Message-ID: <20130225085244.GA21996@marx.bitnet> Reply-To: jruohonen@iki.fi Mail-Followup-To: Tomcat Users List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Virus-Checked: Checked by ClamAV on apache.org Hello. A question related to pools. Background: a big application in which it is preferable to enforce different roles for different databases and tables. This implies that there are different user names and passwords for different connections. As I understand, there are two options for connection pooling in a scheme like this: A. Create different resources for the different roles, each having the user names and passwords defined as constants in the Tomcat configuration files. B. Group the different roles into a bigger scheme and use the option 'alternateUsernameAllowed' to obtain the connections with the specific user names and passwords. Both were tested to work. But I wonder: 1. The first option seems intuitively more efficient. But on the other hand, does each Resource define its own cleaner thread? I wouldn't want to overburden the setup with too many threads. 2. Are there any benchmarks on the option B? The plain FIFO seems rather inefficient if there are many different users/passwords. Any additional thoughts? - Jukka. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org