Issue Details (XML | Word | Printable)

Key: DBCP-184
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Dirk Verbeeck
Votes: 0
Watchers: 0
Operations

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

[dbcp] improved Exception nesting in ConnectionPool

Created: 12/Feb/05 07:23 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: All
Platform: PC

Bugzilla Id: 33529


 Description  « Hide
(reported on commons-dev by Meikel Bisping on 26/01/2005)
----------------------------------------------------------
I tried to establish a ConnectionPool with DBCP to an Informix
Database using your examples.
I always got the exeception "pool exhausted" when trying to open the
first connection.
I eventually found out during debugging that the problem was an older
Informix driver (that is generally still in use, though).
It didn't support read-only mode and threw an SQLException even when
calling setReadOnly(false).
It would be helpful for users if in cases like that the actual
exception would be thrown, "pool exhausted" didn't help much.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Dirk Verbeeck added a comment - 12/Feb/05 07:24 AM
Good suggestion. The underlying exception was already visible in the stacktrace
but the message can be improved.

How about using the following catch block in the connect method.

} catch(SQLException e) {
throw e;
} catch(NoSuchElementException e) {
throw new SQLNestedException("Cannot get a connection, pool error: " +
e.getMessage(), e);
} catch(RuntimeException e) {
throw e;
} catch(Exception e) {
throw new SQLNestedException("Cannot get a connection, general error: " +
e.getMessage(), e);
}

– Dirk


Henri Yandell made changes - 16/May/06 09:51 AM
Field Original Value New Value
issue.field.bugzillaimportkey 33529 12342055
Henri Yandell made changes - 16/May/06 11:28 AM
Key COM-1903 DBCP-184
Component/s Dbcp [ 12311109 ]
Project Commons [ 12310458 ] Commons Dbcp [ 12310469 ]
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Affects Version/s 1.2 Final [ 12311661 ]
Henri Yandell made changes - 16/May/06 12:16 PM
Affects Version/s 1.2 Final [ 12311721 ]
Henri Yandell made changes - 25/Mar/08 08:11 AM
Status Resolved [ 5 ] Closed [ 6 ]