Issue Details (XML | Word | Printable)

Key: DBCP-113
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Rohan Lenard
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Dbcp

Broken behaviour for BasicDataSource.setMaxActive(0)/setMaxIde(0)

Created: 28/Jun/04 08:08 AM   Updated: 25/Mar/08 08:11 AM
Return to search
Component/s: None
Affects Version/s: 1.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Operating System: other
Platform: Other

Bugzilla Id: 29832


 Description  « Hide
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



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henri Yandell made changes - 16/May/06 09:42 AM
Field Original Value New Value
issue.field.bugzillaimportkey 29832 12341545
Henri Yandell made changes - 16/May/06 11:28 AM
Key COM-1393 DBCP-113
Project Commons [ 12310458 ] Commons Dbcp [ 12310469 ]
Component/s Dbcp [ 12311109 ]
Affects Version/s 1.2 Final [ 12311661 ]
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Henri Yandell made changes - 16/May/06 12:23 PM
Affects Version/s 1.2 Final [ 12311721 ]
Henri Yandell made changes - 25/Mar/08 08:11 AM
Status Resolved [ 5 ] Closed [ 6 ]