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 RE: [DBCP] per-user connection pooling
Date Mon, 25 Oct 2004 08:11:08 GMT
> The default BasicDataSource doesn't support the 
> getConnection(username, password) method.

Ahh, thanks for letting me know. I'll let Oracle know that their driver
is actually working okay. Any chance you could document this limitation
- there's nothing in the DBCP documentation or JavaDocs to suggest that
this doesn't work?

> 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.

I've been using some very simple in-container tests using some JSPs or
servlets that calls our Data-Access Object (DAO) layer code, JUnit,
HttpUnit (http://httpunit.sourceforge.net) to call the JSPs/Servlets,
and JUnitPerf (http://www.clarkware.com/software/JUnitPerf.html) to run
tests concurrently. This involves having a complete working environment
and, since we're using SSL, registering certificates with the JDK.

The actual tests themselves are very simple (e.g. repeatedly loading one
entity from a simple table) and are run using each type of connection
(direct or pooled).

Cheers,

  Chris Nappin.



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.<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.

> 
>  
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message