public synchronized void close() {
    resetPoolManager();
    is_closed = true;

    C3P0Registry.markClosed(this);

    if (Debug.DEBUG && Debug.TRACE == Debug.TRACE_MAX && logger.isLoggable(MLevel.FINEST)) {
      logger.log(
          MLevel.FINEST,
          this.getClass().getName()
              + '@'
              + Integer.toHexString(System.identityHashCode(this))
              + " has been closed. ",
          new Exception("DEBUG STACK TRACE for PoolBackedDataSource.close()."));
    }
  }
  // javax.sql.ConnectionPoolDataSource interface methods
  public PooledConnection getPooledConnection() throws SQLException {
    PooledConnection pc;
    if (cpDS_ != null) {
      if (out_ != null) out_.println(getTraceId() + "getPooledConnection()");

      pc = cpDS_.getPooledConnection();

      if (out_ != null)
        out_.println(
            getTraceId()
                + "getPooledConnection() returns PooledConnection ["
                + System.identityHashCode(pc)
                + "]");

      return new TPooledConnection(pc, out_);
    } else throw new SQLException("Trace Data Source" + traceDataSource_ + "Not found");
  }
  public String getTraceId() {

    // Build up jdbcTrace output entry
    setTraceId(
        org.trafodion.jdbc.t2.T2Driver.traceText
            + org.trafodion.jdbc.t2.T2Driver.dateFormat.format(new Date())
            + "]:["
            + Thread.currentThread()
            + "]:["
            + System.identityHashCode(this)
            + "]:"
            + getClass()
                .getName()
                .substring(
                    org.trafodion.jdbc.t2.T2Driver.REMOVE_PKG_NAME, getClass().getName().length())
            + ".");
    return traceId_;
  }
  TConnectionPoolDataSource(String traceDataSource, ConnectionPoolDataSource cpDS) {
    String className = null;

    traceDataSource_ = traceDataSource;
    cpDS_ = cpDS;
    if (cpDS_ != null) className = cpDS_.getClass().getName();

    // Build up jdbcTrace output entry
    setTraceId(
        org.trafodion.jdbc.t2.T2Driver.traceText
            + org.trafodion.jdbc.t2.T2Driver.dateFormat.format(new Date())
            + "]:["
            + Thread.currentThread()
            + "]:["
            + System.identityHashCode(cpDS_)
            + "]:"
            + className.substring(
                org.trafodion.jdbc.t2.T2Driver.REMOVE_PKG_NAME, className.length())
            + ".");
  }
  public PooledConnection getPooledConnection(String username, String password)
      throws SQLException {
    PooledConnection pc;
    if (cpDS_ != null) {
      if (out_ != null)
        out_.println(getTraceId() + "getPooledConnection(\"" + username + "\", \"****\")");

      pc = cpDS_.getPooledConnection(username, password);

      if (out_ != null)
        out_.println(
            getTraceId()
                + "getPooledConnection(\""
                + username
                + "\", \"****\") returns PooledConnection ["
                + System.identityHashCode(pc)
                + "]");

      return new TPooledConnection(pc, out_);
    } else throw new SQLException("Trace Data Source" + traceDataSource_ + "Not found");
  }