Examples of NewProxyConnection


Examples of com.mchange.v2.c3p0.impl.NewProxyConnection

                arglist[0] = ReflectionUtils.invokeMethod(conn, "getUnderlyingConnection", null);
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
            }
            // C3P0 pool managed connection.
            else if (NewProxyConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                NewProxyConnection castCon = (NewProxyConnection) conn;
                arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
                tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
            }
            // Apache's DBCP pool managed connection.
            else if (PoolableConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
View Full Code Here

Examples of com.mchange.v2.c3p0.impl.NewProxyConnection

            if (Class.forName(ORACLE_JDBC_ORACLE_CONNECTION).isAssignableFrom(conn.getClass())) {
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
            }
            // The connection has been opened by the C3P0 pool.
            else if (NewProxyConnection.class.isAssignableFrom(conn.getClass())) {
                NewProxyConnection castCon = (NewProxyConnection) conn;
                arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
                tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
            }
            // The connection has been configured as a Tomcat data source.
            else if (PoolableConnection.class.isAssignableFrom(conn.getClass())) {
                arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
View Full Code Here

Examples of com.mchange.v2.c3p0.impl.NewProxyConnection

                arglist[0] = ReflectionUtils.invokeMethod(conn, "getUnderlyingConnection", null);
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
            }
            // C3P0 pool managed connection.
            else if (NewProxyConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                NewProxyConnection castCon = (NewProxyConnection) conn;
                arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
                tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
            }
            // Apache's DBCP pool managed connection.
            else if (PoolableConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
View Full Code Here

Examples of com.mchange.v2.c3p0.impl.NewProxyConnection

        if (conn instanceof ConnectionHandle) {
            ConnectionHandle handle = (ConnectionHandle) conn;
            return (MockConnection) handle.getInternalConnection();
        }
        if (conn instanceof NewProxyConnection) {
            NewProxyConnection handle = (NewProxyConnection) conn;

            Field field = NewProxyConnection.class.getDeclaredField("inner");
            field.setAccessible(true);
            return (MockConnection) field.get(handle);
        }
View Full Code Here

Examples of com.mchange.v2.c3p0.impl.NewProxyConnection

        if (conn instanceof ConnectionHandle) {
            ConnectionHandle handle = (ConnectionHandle) conn;
            return (MockConnection) handle.getInternalConnection();
        }
        if (conn instanceof NewProxyConnection) {
            NewProxyConnection handle = (NewProxyConnection) conn;
           
            Field field = NewProxyConnection.class.getDeclaredField("inner");
            field.setAccessible(true);
            return (MockConnection) field.get(handle);
        }
View Full Code Here

Examples of com.mchange.v2.c3p0.impl.NewProxyConnection

                arglist[0] = ReflectionUtils.invokeMethod(conn, "getUnderlyingConnection", null);
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
            }
            // C3P0 pool managed connection.
            else if (NewProxyConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                NewProxyConnection castCon = (NewProxyConnection) conn;
                arglist[0] = C3P0ProxyConnection.RAW_CONNECTION;
                tempBlob = castCon.rawConnectionOperation(createTempMethod, C3P0ProxyConnection.RAW_CONNECTION, arglist);
            }
            // Apache's DBCP pool managed connection.
            else if (PoolableConnection.class.isAssignableFrom(connClassInCurrentClassLoader)) {
                arglist[0] = ((PoolableConnection) statement.getConnection()).getDelegate();
                tempBlob = createTempMethod.invoke(null, arglist); // null is valid because of static method
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.