Exemplo n.º 1
0
  public C3P0PooledConnection(
      Connection con,
      ConnectionTester connectionTester,
      boolean autoCommitOnClose,
      boolean forceIgnoreUnresolvedTransactions,
      ConnectionCustomizer cc,
      String pdsIdt)
      throws SQLException {
    try {
      if (cc != null) cc.onAcquire(con, pdsIdt);
    } catch (Exception e) {
      throw SqlUtils.toSQLException(e);
    }

    this.physicalConnection = con;
    this.connectionTester = connectionTester;
    this.autoCommitOnClose = autoCommitOnClose;
    this.forceIgnoreUnresolvedTransactions = forceIgnoreUnresolvedTransactions;
    this.supports_setTypeMap =
        C3P0ImplUtils.supportsMethod(con, "setTypeMap", new Class[] {Map.class});
    this.supports_setHoldability =
        C3P0ImplUtils.supportsMethod(con, "setHoldability", new Class[] {int.class});
    this.dflt_txn_isolation = con.getTransactionIsolation();
    this.dflt_catalog = con.getCatalog();
    this.dflt_holdability =
        (supports_setHoldability ? con.getHoldability() : ResultSet.CLOSE_CURSORS_AT_COMMIT);
  }
Exemplo n.º 2
0
 public int getTransactionIsolation() throws SQLException {
   return conn.getTransactionIsolation();
 }