Code example for PooledConnection

Methods: addConnectionEventListener

0
pc = _cpds.getPooledConnection(username, upkey.getPassword());
            } 
            // should we add this object as a listener or the pool. 
            // consider the validateObject method in decision 
            pc.addConnectionEventListener(this);
            pcKeyMap.put(pc, key);
        } 
        catch (SQLException e) 
        { 
            throw new RuntimeException(e.getMessage());
        } 
        return pc;
    } 
 
    public void destroyObject(Object key, Object obj) {
        if(obj instanceof PooledConnection) {
            try { 
                ((PooledConnection)obj).close();
            } catch(RuntimeException e) {