Examples of rawConnectionOperation()


Examples of com.mchange.v2.c3p0.C3P0ProxyConnection.rawConnectionOperation()

    C3P0ProxyConnection conn = (C3P0ProxyConnection) cpds.getConnection();
    Method toStringMethod = Object.class.getMethod("toString", new Class[]{});
    Method identityHashCodeMethod = System.class.getMethod("identityHashCode", new Class[] {Object.class});
    System.out.println("rawConnection.toString() -> " +
           conn.rawConnectionOperation(toStringMethod, C3P0ProxyConnection.RAW_CONNECTION, new Object[]{}));
    Integer ihc = (Integer) conn.rawConnectionOperation(identityHashCodeMethod, null, new Object[]{C3P0ProxyConnection.RAW_CONNECTION});
    System.out.println("System.identityHashCode( rawConnection ) -> " + Integer.toHexString( ihc.intValue() ));

    C3P0ProxyStatement stmt = (C3P0ProxyStatement) conn.createStatement();
    System.out.println("rawStatement.toString() -> " +
           stmt.rawStatementOperation(toStringMethod, C3P0ProxyStatement.RAW_STATEMENT, new Object[]{}));
View Full Code Here

Examples of com.mchange.v2.c3p0.C3P0ProxyConnection.rawConnectionOperation()

          // no need for reflection
          ((com.mysql.jdbc.Connection) con).ping();
        } else {
          // Assume the connection is a C3P0 proxy
          C3P0ProxyConnection castCon = (C3P0ProxyConnection) con;
          castCon.rawConnectionOperation(pingMethod,
              C3P0ProxyConnection.RAW_CONNECTION, NO_ARGS_ARRAY);
        }
      } else {
        Statement pingStatement = null;
View Full Code Here

Examples of com.mchange.v2.c3p0.impl.NewProxyConnection.rawConnectionOperation()

            }
            // 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.rawConnectionOperation()

            }
            // 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.rawConnectionOperation()

            }
            // 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.rawConnectionOperation()

            }
            // 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.