Examples of removeConnectionEventListener()


Examples of javax.sql.PooledConnection.removeConnectionEventListener()

        if (null != event.getSQLException()) {
            System.err
                .println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR (" +
                         event.getSQLException() + ")");
        }
        pc.removeConnectionEventListener(this);

        PooledConnectionAndInfo info = (PooledConnectionAndInfo) pcMap.get(pc);
        if (info == null) {
            throw new IllegalStateException(NO_KEY_MESSAGE);
        }
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

     * Closes the PooledConnection and stops listening for events from it.
     */
    public void destroyObject(Object obj) throws Exception {
        if (obj instanceof PooledConnectionAndInfo) {
            PooledConnection pc = ((PooledConnectionAndInfo)obj).getPooledConnection();
            pc.removeConnectionEventListener(this);
            pcMap.remove(pc);
            pc.close();
        }
    }

View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

            try {
                _pool.returnObject(info);
            } catch (Exception e) {
                System.err.println("CLOSING DOWN CONNECTION AS IT COULD "
                        + "NOT BE RETURNED TO THE POOL");
                pc.removeConnectionEventListener(this);
                try {
                    destroyObject(info);
                } catch (Exception e2) {
                    System.err.println("EXCEPTION WHILE DESTROYING OBJECT "
                            + info);
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

        if (null != event.getSQLException()) {
            System.err.println(
                    "CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR ("
                    + event.getSQLException() + ")");
        }
        pc.removeConnectionEventListener(this);

        Object info = pcMap.get(pc);
        if (info == null) {
            throw new IllegalStateException(NO_KEY_MESSAGE);
        }
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

            // clean used connections
            ListIterator<PooledConnection> usedIterator = usedPool.listIterator();
            while (usedIterator.hasNext()) {
                PooledConnection con = usedIterator.next();
                // stop listening for connection events
                con.removeConnectionEventListener(this);
                // close connection
                con.close();
                // remove connection from the list
                usedIterator.remove();
            }
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

         * the event and containing the <code>SQLException</code> that the
         * driver is about to throw
         */
        public void connectionErrorOccurred(ConnectionEvent event) {
            PooledConnection pconn = (PooledConnection)event.getSource();
            pconn.removeConnectionEventListener(this);
            ConnectionInfo cinfo = connMap.get(pconn);
            if (cinfo == null) {
                throw new IllegalStateException(
                "connectionErrorOccurred: No mapping for PooledConnection 0x"+
                 pconn.hashCode()+"["+pconn.getClass().getName()+"]");
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

             */
            public void connectionClosed(ConnectionEvent event) {
                PooledConnection pce = (PooledConnection) event.getSource();
                assertSame(pc, pce);
                count1[0]++;
                pce.removeConnectionEventListener(this);
            }

            public void connectionErrorOccurred(ConnectionEvent event) {
            }
           
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

    /**
     * INTERNAL
     */
    public void connectionClosed(ConnectionEvent event) {
        PooledConnection pc = (PooledConnection) event.getSource();
        pc.removeConnectionEventListener(this);
        recycleConnection(pc);
    }

    /**
     * INTERNAL
 
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

  /**
   * INTERNAL
   */
  public void connectionClosed(ConnectionEvent event) {
    PooledConnection pc = (PooledConnection) event.getSource();
    pc.removeConnectionEventListener(this);
    recycleConnection(pc);
  }

  /**
   * INTERNAL
 
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

            // clean used connections
            ListIterator<PooledConnection> usedIterator = usedPool.listIterator();
            while (usedIterator.hasNext()) {
                PooledConnection con = usedIterator.next();
                // stop listening for connection events
                con.removeConnectionEventListener(this);
                // close connection
                con.close();
                // remove connection from the list
                usedIterator.remove();
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.