Examples of rawConnectionOperation()


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

        if (conn instanceof C3P0ProxyConnection) {
            try {
                C3P0ProxyConnection c3p0Conn = (C3P0ProxyConnection) conn;
                Method m = Connection.class.getMethod("createBlob", new Class[]{}); //will call createBlob method on the underlying connection
                Object[] args = new Object[]{}; //arguments to be passed to the method. none in this case
                Blob blob = (Blob) c3p0Conn.rawConnectionOperation(m, C3P0ProxyConnection.RAW_CONNECTION, args);
                blob.setBytes(1, byteArray);
                ps.setBlob(index, blob);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
View Full Code Here

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

  @Override
  protected Connection doGetNativeConnection(Connection con) throws SQLException {
    if (con instanceof C3P0ProxyConnection) {
      C3P0ProxyConnection cpCon = (C3P0ProxyConnection) con;
      try {
        return (Connection) cpCon.rawConnectionOperation(
            this.getRawConnectionMethod, null, new Object[] {C3P0ProxyConnection.RAW_CONNECTION});
      }
      catch (SQLException ex) {
        throw ex;
      }
View Full Code Here

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

  @Override
  protected Connection doGetNativeConnection(Connection con) throws SQLException {
    if (con instanceof C3P0ProxyConnection) {
      C3P0ProxyConnection cpCon = (C3P0ProxyConnection) con;
      try {
        return (Connection) cpCon.rawConnectionOperation(
            this.getRawConnectionMethod, null, new Object[] {C3P0ProxyConnection.RAW_CONNECTION});
      }
      catch (SQLException ex) {
        throw ex;
      }
View Full Code Here

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() -> " +
View Full Code Here

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()

       
    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() -> " +
View Full Code Here

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.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() -> " +
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.