Code example for PooledConnection

Methods: addConnectionEventListener

0
            throw new IllegalStateException("Connection pool data source returned null from getPooledConnection");
        } 
 
        // should we add this object as a listener or the pool. 
        // consider the validateObject method in decision 
        pc.addConnectionEventListener(this);
        obj = new PooledConnectionAndInfo(pc, username, password);
        pcMap.put(pc, obj);
 
        return obj;
    } 
 
    /** 
     * Closes the PooledConnection and stops listening for events from it. 
     */ 
    public void destroyObject(Object key, Object obj) throws Exception {
        if (obj instanceof PooledConnectionAndInfo) {
            PooledConnection pc = ((PooledConnectionAndInfo)obj).getPooledConnection();
            pc.removeConnectionEventListener(this);
            pcMap.remove(pc);
Connect your IDE to all the code out there  Get Codota for Java