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
No work has yet been logged on this issue.