
| Key: |
DBCP-184
|
| Type: |
Improvement
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Dirk Verbeeck
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Operating System: All
Platform: PC
Operating System: All
Platform: PC
|
|
|
(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.
|
|
Description
|
(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. |
Show » |
|
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