You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/06/28 03:08:53 UTC
DO NOT REPLY [Bug 29832] New: -
Broken behaviour for BasicDataSource.setMaxActive(0)/setMaxIde(0)
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29832>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29832
Broken behaviour for BasicDataSource.setMaxActive(0)/setMaxIde(0)
Summary: Broken behaviour for
BasicDataSource.setMaxActive(0)/setMaxIde(0)
Product: Commons
Version: 1.2 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Minor
Priority: Other
Component: Dbcp
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: rlenard@avaya.com
I wanted to make a datasource that fails on each attempt (for testing purposes).
The way the pools are configured appears to be wrong because if I do this -
final BasicDataSource ds = new BasicDataSource();
ds.setDriverClassName(driverName);
ds.setUrl(url);
ds.setUsername(userName);
ds.setPassword(passwd);
ds.setMaxActive(0);
ds.setMaxIdle(0);
final Connection conn = ds.getConnection();
I expect to get an SQL Exception about exhausted pool. Instead it just gives
me a connection !!.
There is a workaround - use a null driver name - but that is silly - it should
be doing the right thing with the pool
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org