Package com.jolbox.bonecp

Examples of com.jolbox.bonecp.ConnectionHandle


    CopyManager manager = null;
    try {
      con = this.getConnection();
      con.setAutoCommit(false);
      if(con instanceof com.jolbox.bonecp.ConnectionHandle){
        ConnectionHandle handle = (ConnectionHandle)con;
        manager = new CopyManager(
            (BaseConnection) handle.getInternalConnection());
      } else {
        manager = new CopyManager((BaseConnection) con);
      }
     
      manager.copyIn(query, reader);
View Full Code Here


*/
public class BoneCPConnectionAccessor implements ConnectionAccessor {

    @Override
    public Connection getRawConnection(Connection providerConnection) {
        ConnectionHandle ch = (ConnectionHandle) providerConnection;
        return ch.getInternalConnection();
    }
View Full Code Here

        return mockStmt;
    }

    public static MockConnection unwrap(Connection conn) throws Exception {
        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");
View Full Code Here

        }
    }

    public static MockConnection unwrap(Connection conn) throws Exception {
        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");
View Full Code Here

TOP

Related Classes of com.jolbox.bonecp.ConnectionHandle

Copyright © 2018 www.massapicom. 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.