Examples of removeConnectionEventListener()


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

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

      Connection conn = null;
      Throwable rootCause = null;
      try 
          {
        //we don't want any callbacks while we're testing the resource
        pc.removeConnectionEventListener( cl );
       
        conn = pc.getConnection(); //checkout proxy connection
        if ( testQuery == null )
            status = connectionTester.activeCheckConnection( conn );
        else
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

      Connection conn = null;
      Throwable rootCause = null;
      try 
          {
        //we don't want any callbacks while we're testing the resource
        pc.removeConnectionEventListener( cl );
       
        conn = pc.getConnection(); //checkout proxy connection
        if ( testQuery == null )
            status = connectionTester.activeCheckConnection( conn );
        else
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()

                        "CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR ("
                        + event.getSQLException() + ")");
            }
            //remove this from the listener list because we are no more
            //interested in errors since we are about to close this connection
            pc.removeConnectionEventListener(this);
        } catch (Exception ignore) {
            // ignore
        }

        Object info = pcMap.get(pc);
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

                    .println("CLOSING DOWN CONNECTION DUE TO INTERNAL ERROR (" +
                             event.getSQLException() + ")");
            }
            //remove this from the listener list because we are no more
            //interested in errors since we are about to close this connection
            pc.removeConnectionEventListener(this);
        } catch (Exception ignore) {
            // ignore
        }

        PooledConnectionAndInfo info = (PooledConnectionAndInfo) pcMap.get(pc);
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()

                        Connection con = null;

                        try
                        {
                            //we don't want any callbacks while we're clearing warnings
                            pc.removeConnectionEventListener( cl );

                            con = pc.getConnection();
                            SQLWarnings.logAndClearWarnings(con);
                        }
                        finally
View Full Code Here

Examples of javax.sql.PooledConnection.removeConnectionEventListener()

                    Connection conn = null;
                    Throwable rootCause = null;
                    try 
                    {
                        //we don't want any callbacks while we're testing the resource
                        pc.removeConnectionEventListener( cl );

                        conn = pc.getConnection(); //checkout proxy connection

                        // if this is a c3p0 pooled-connection, let's get underneath the
                        // proxy wrapper, and test the physical connection sometimes.
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.