commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: ManualPoolingDriverExample
Date Sat, 21 Feb 2004 12:28:53 GMT

Both methods are new and are not in DBCP v1.1.
For getConnectionPool you can use the older getPool method
(be carefull this one thows RuntimeExceptions and is deprecated)
For closePool there is no equivalent in v1.1
(Bugzilla Bug 24562: PoolingDriver needs a closePool method)

You can use a nightly build or apply the following changes:
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/PoolingDriver.java?r1=1.7&r2=1.8&diff_format=h

Sorry about the confusion
Dirk


Dean A. Hoover wrote:

> I want to use connection pooling in a non-web
> application. I found ManualPoolingDriverExample.java
> and am attempting to learn from it. However, it
> will not compile:
> 
>     [javac] 
> /home/dhoover/DEVEL/universal-common/src/ManualPoolingDriverExample.java:241: 
> getConnectionPool(java.lang.String) has protected access in 
> org.apache.commons.dbcp.PoolingDriver
>     [javac]         ObjectPool connectionPool = 
> driver.getConnectionPool("example");
>     [javac]                                           ^
>     [javac] 
> /home/dhoover/DEVEL/universal-common/src/ManualPoolingDriverExample.java:249: 
> cannot resolve symbol
>     [javac] symbol  : method closePool (java.lang.String)
>     [javac] location: class org.apache.commons.dbcp.PoolingDriver
>     [javac]         driver.closePool("example");
>     [javac]               ^
>     [javac] 2 errors
> 
> Am I missing something here, or is the example not in step with:
> 
> commons-collections-3.0.jar
> commons-dbcp-1.1.jar
> commons-pool-1.1.jar
> 
> Thanks.
> Dean Hoover




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