List of usage examples for javax.sql PooledConnection removeConnectionEventListener
void removeConnectionEventListener(ConnectionEventListener listener);
PooledConnection
object. From source file:com.alibaba.wasp.jdbcx.JdbcConnectionPool.java
/** * INTERNAL//from w ww .ja v a 2s .c o m */ public void connectionClosed(ConnectionEvent event) { PooledConnection pc = (PooledConnection) event.getSource(); pc.removeConnectionEventListener(this); recycleConnection(pc); }
From source file:org.enhydra.jdbc.pool.StandardPoolDataSource.java
/** * object specific work to kill the object *///from w ww .j a v a2s . c o m public void expire(Object o) { log.debug("StandardPoolDataSource:expire expire a connection, remove from the pool"); if (o == null) return; try { PooledConnection pooledCon = (PooledConnection) o; pooledCon.close(); // call close() of PooledConnection pooledCon.removeConnectionEventListener(this); log.debug("StandardPoolDataSource:expire close the connection"); } catch (java.sql.SQLException e) { log.error("StandardPoolDataSource:expire Error java.sql.SQLException in StandardPoolDataSource:expire"); } }