Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 48530 invoked from network); 24 Oct 2004 21:09:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Oct 2004 21:09:23 -0000 Received: (qmail 51816 invoked by uid 500); 24 Oct 2004 21:09:16 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 51675 invoked by uid 500); 24 Oct 2004 21:09:15 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 51661 invoked by uid 99); 24 Oct 2004 21:09:14 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [195.130.132.58] (HELO astra.telenet-ops.be) (195.130.132.58) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 24 Oct 2004 14:09:12 -0700 Received: from localhost (localhost.localdomain [127.0.0.1]) by astra.telenet-ops.be (Postfix) with SMTP id 53250328132 for ; Sun, 24 Oct 2004 23:09:10 +0200 (MEST) Received: from pandora.be (D5E05804.kabel.telenet.be [213.224.88.4]) by astra.telenet-ops.be (Postfix) with ESMTP id 33F2232813F for ; Sun, 24 Oct 2004 23:09:10 +0200 (MEST) Message-ID: <417C19EE.4020906@pandora.be> Date: Sun, 24 Oct 2004 23:09:02 +0200 From: Dirk Verbeeck User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: Re: [DBCP] per-user connection pooling References: <85246635F4B873488A4020DFBA2E11220158238E@abmukdove.abm-uk.com> In-Reply-To: <85246635F4B873488A4020DFBA2E11220158238E@abmukdove.abm-uk.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The default BasicDataSource doesn't support the getConnection(username, password) method. Username and password are properties given to the driver and have to be configured on a DataSource level. The oracle error is a strange one but is probably correct (no username/password given) Using the second method is your best bet on the short term. I can't really say anything about the speed of the PerUserPoolDataSource. I did write some performance tests on BasicDataSource but not on PerUserPoolDataSource. If you wtrite some performance tests then I will take a look at them. Regards Dirk Chris Nappin wrote: > Hi, > > > > I've been trying to get per-user connection pooling working with > Oracle 9i, Tomcat and DBCP: i.e. NOT putting any username or password in > the JNDI settings, then calling "getConnection(username, password)" > instead of "getConnection()". > > > > As far as I can see there are two approaches with DBCP: > > > > 1. use the driver "directly" via > org.apache.commons.dbcp.BasicDataSourceFactory; > 2. use the driver "indirectly" via the DriverAdapterCPDS wrapper > functionality and > org.apache.commons.dbcp.datasources.PerUserPoolDataSourceFactory. > > > > The second method may be fixed in the next nightly build (thanks Dirk > Verbeeck) but so far seems to be quite slow (only 10% quicker than > direct connections). Has anyone ever got the first method working? I get > an exception thrown from the Oracle Driver itself: > > > > java.sql.SQLException: invalid arguments in call > at > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) > at > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179) > at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160) > at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:183) > at > oracle.jdbc.driver.OracleConnection.(OracleConnection.java:346) > at > oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java: > 468) > at > oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314) > at > org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverC > onnectionFactory.java:37) > > > > I've raised an iTAR (bug report) with Oracle but the comments so far > from Oracle support have been to put the blame on the JNDI/DBCP code... > > > > Regards > > Chris Nappin > > Senior Analyst Programmer > > ABM United Kingdom Limited > Telephone: +44 (0) 115 977 6999 > Facsimile: +44 (0) 115 977 6850 > Web: http://www.abm-uk.com > > ABM for Intelligent Solutions > > The information contained in this email is intended only for the named > recipient(s) and may be confidential and/or privileged. Unauthorised use > or reproduction (including storage or re-distribution in any media) is > prohibited. > > ABM-United Kingdom Limited may monitor the content of e-mails and files > sent and received via its network for the purposes of ensuring > compliance with its legal obligations and its policies and procedures. > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org