Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
javax.sql.PooledConnection.removeConnectionEventListener(ConnectionEventListener) does not throw any Exceptions, yet DBCP protects calls to it, generally ignoring any Exception.
For example, in datasources.CPDSConnectionFactory:
public void destroyObject(Object obj) throws Exception { if (obj instanceof PooledConnectionAndInfo) { PooledConnection pc = ((PooledConnectionAndInfo)obj).getPooledConnection(); try { pc.removeConnectionEventListener(this); } catch (Exception e) { //ignore } ....
This seems wrong, as the code may accidentally swallow a genuine Exception.