commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nappin" <C.Nap...@abm-uk.com>
Subject [DBCP] per-user connection pooling
Date Thu, 21 Oct 2004 16:27:55 GMT
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.<init>(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. 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message