Package javax.sql

Examples of javax.sql.PooledConnection.removeConnectionEventListener()


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

    /**
     * Returns the number of active (open) connections of this pool. This is the
View Full Code Here


                        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

                    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

                        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

                    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

     */
    public synchronized void connectionErrorOccurred(ConnectionEvent event) {

        PooledConnection connection = (PooledConnection) event.getSource();

        connection.removeConnectionEventListener(this);
        this.connectionsInUse.remove(connection);
        this.sessionConnectionWrappers.remove(connection);
        logInfo(
            "Fatal exception occurred on pooled connection. Connection is removed from pool: ");
        logInfo(event.getSQLException());
View Full Code Here

            }

            PooledConnection pooledConnection = null;
            try {
                pooledConnection = (PooledConnection) event.getSource();
                pooledConnection.removeConnectionEventListener(this);

                stats.connectionReturned(nanosSince(checkoutTime));
            }
            finally {
                semaphore.release();
View Full Code Here

            }

            PooledConnection pooledConnection = null;
            try {
                pooledConnection = (PooledConnection) event.getSource();
                pooledConnection.removeConnectionEventListener(this);

                stats.connectionErrorOccurred();
            }
            finally {
                semaphore.release();
View Full Code Here

            }

            PooledConnection pooledConnection = null;
            try {
                pooledConnection = (PooledConnection) event.getSource();
                pooledConnection.removeConnectionEventListener(this);

                stats.connectionReturned(nanosSince(checkoutTime));
            }
            finally {
                semaphore.release();
View Full Code Here

            }

            PooledConnection pooledConnection = null;
            try {
                pooledConnection = (PooledConnection) event.getSource();
                pooledConnection.removeConnectionEventListener(this);

                stats.connectionErrorOccurred();
            }
            finally {
                semaphore.release();
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.