docs: public String toString2(int options) {
  
          StringBuffer aBuffer = new StringBuffer(500);
          StringBuffer bBuffer = new StringBuffer(500);
          ArrayList<ToStringStackElements> throwableStackTraceElements = new ArrayList<ToStringStackElements>();
  
          aBuffer.append("JNDI name:");
          aBuffer.append(gConfigProps.cfName);
          aBuffer.append(nl);
          aBuffer.append("PoolManager object:");
          aBuffer.append(this.hashCode());
          aBuffer.append(nl);
          aBuffer.append("Total number of connections: ");
          if (connectionPoolShutDown) {
              aBuffer.append("purging ");
          }
          aBuffer.append(totalConnectionCount.get());
          aBuffer.append(" (max/min ");
          aBuffer.append(maxConnections);
          aBuffer.append("/");
          aBuffer.append(minConnections);
          aBuffer.append(", reap/unused/aged ");
          aBuffer.append(reapTime);
          aBuffer.append("/");
          aBuffer.append(unusedTimeout);
          aBuffer.append("/");
          aBuffer.append(agedTimeout);
          aBuffer.append(", connectiontimeout/purge ");
          aBuffer.append(connectionTimeout);
          aBuffer.append("/");
          aBuffer.append(purgePolicy);
          aBuffer.append(")");
  
          /*
           * Log additional information only if function is enabled.
           */
          if (localConnection_ != null) {
              bBuffer.append(", maxTLS ");
              bBuffer.append(maxCapacity);
          }
  
          if (bBuffer.length() > 1) {
              aBuffer.append(nl);
              aBuffer.append("                              ");
              aBuffer.append(" (");
              aBuffer.append(bBuffer.substring(2));
              aBuffer.append(")");
          }
  
          bBuffer.delete(0, bBuffer.length());
  
          if (_quiesce) { //  include quiesce time
              aBuffer.append("  quiesce time:");
              aBuffer.append(_quiesceTime);
          }
  
          aBuffer.append(nl);
  
          if (waiterCount > 0) {
              aBuffer.append("The waiter count is ");
              aBuffer.append(waiterCount);
              aBuffer.append(nl);
              aBuffer.append("The mcWrappers in waiter queue ");
              try {
                  aBuffer.append(mcWrapperWaiterList);
              } catch (ConcurrentModificationException cm) {
                  aBuffer.append("info not available");
              }
              aBuffer.append(nl);
          }
  
          if (!gConfigProps.connectionPoolingEnabled) {
              aBuffer.append("Connection pooling is disabled, free connections are not pooled.");
          }
          /*
           * Shared connection information
           */
          int totalNumberOfSharedConnections = 0;
          StringBuffer connectionLeakBuffer = null;
          long currentTime = 0;
          int holdTimeLimit_loc = -1;
          if (options == 0) {
              holdTimeLimit_loc = holdTimeLimit;
          }
          if (holdTimeLimit_loc > -1) {
              connectionLeakBuffer = new StringBuffer();
              currentTime = System.currentTimeMillis();
          }
          aBuffer.append("Shared Connection information (shared partitions " + maxSharedBuckets + ")");
          aBuffer.append(nl);
          boolean atleastOne = false;
          currentTime = System.currentTimeMillis();
          mcToMCWMapWrite.lock();
          try {
              int mcToMCWSize = mcToMCWMap.size();
              if (mcToMCWSize > 0) {
                  Object[] tempObject = mcToMCWMap.values().toArray();
                  for (int ti = 0; ti < mcToMCWSize; ++ti) {
                      MCWrapper mcw = (MCWrapper) tempObject[ti];
                      if (mcw.getPoolState() == 2) {
                          aBuffer.append("    ");
                          if (mcw.isDestroyState()) {
                              aBuffer.append("Connection marked for thread supported cleanup and destroy.  Waiting ");
                              aBuffer.append("for transaction end and connection close - ");
                          } else {
                              if (mcw.isStale() || mcw.hasFatalErrorNotificationOccurred(freePool[0].getFatalErrorNotificationTime())
                                  || ((this.agedTimeout != -1)
                                      && (mcw.hasAgedTimedOut(this.agedTimeoutMillis)))) {
                                  aBuffer.append("Connection marked to be destroyed.  Waiting ");
                                  aBuffer.append("for transaction end and connection close - ");
                              }
                          }
                          aBuffer.append(mcw.getSharedPoolCoordinator());
                          aBuffer.append("  ");
                          aBuffer.append(mcw);
                          if (holdTimeLimit_loc > -1) {
                              dumpHoldTimeAndStackInfo(mcw, aBuffer, connectionLeakBuffer, currentTime, throwableStackTraceElements);
                          }
                          ++totalNumberOfSharedConnections;
                          atleastOne = true;
                      }
                  }
              }
          } finally {
              mcToMCWMapWrite.unlock();
          }
          if (atleastOne) {
              aBuffer.append("  Total number of connection in shared pool: ");
              aBuffer.append(totalNumberOfSharedConnections);
          } else {
              aBuffer.append("  No shared connections");
              aBuffer.append(nl);
          }
  
          /*
           * Free pool connection information
           */
          int totalNumberOfFreeConnections = 0;
          aBuffer.append(nl);
          aBuffer.append("Free Connection information (free distribution table " + maxFreePoolHashSize + ")");
          aBuffer.append(nl);
          atleastOne = false;
          mcToMCWMapWrite.lock();
          try {
              int mcToMCWSize = mcToMCWMap.size();
              if (mcToMCWSize > 0) {
                  Object[] tempObject = mcToMCWMap.values().toArray();
                  for (int ti = 0; ti < mcToMCWSize; ++ti) {
                      MCWrapper mcw = (MCWrapper) tempObject[ti];
                      if (mcw.getPoolState() == 1) {
                          aBuffer.append("  (" + mcw.getHashMapBucket() + ")");
                          aBuffer.append(mcw);
                          ++totalNumberOfFreeConnections;
                          atleastOne = true;
                      }
                  }
              }
          } finally {
              mcToMCWMapWrite.unlock();
          }
          aBuffer.append(nl);
          if (atleastOne) {
              aBuffer.append("  Total number of connection in free pool: ");
              aBuffer.append(totalNumberOfFreeConnections);
          } else {
              aBuffer.append("  No free connections");
              aBuffer.append(nl);
          }
  
          /*
           * Inuse UnShared connection information
           */
          aBuffer.append(nl);
          int totalNumberOfUnSharedConnections = 0;
          aBuffer.append("UnShared Connection information");
          aBuffer.append(nl);
          atleastOne = false;
          mcToMCWMapWrite.lock();
          try {
              int mcToMCWSize = mcToMCWMap.size();
              if (mcToMCWSize > 0) {
                  Object[] tempObject = mcToMCWMap.values().toArray();
                  for (int ti = 0; ti < mcToMCWSize; ++ti) {
                      MCWrapper mcw = (MCWrapper) tempObject[ti];
                      if (mcw.getPoolState() == 3) {
                          aBuffer.append("    ");
                          if (mcw.isStale()
                              || mcw.hasFatalErrorNotificationOccurred(freePool[0].getFatalErrorNotificationTime())
                              || ((this.agedTimeout != -1) && (mcw.hasAgedTimedOut(this.agedTimeoutMillis)))) {
                              aBuffer.append("Connection marked to be destroyed.  Waiting ");
                              aBuffer.append("for transaction end and connection close - ");
                          }
                          aBuffer.append(mcw);
                          if (holdTimeLimit_loc > -1) {
                              dumpHoldTimeAndStackInfo(mcw, aBuffer, connectionLeakBuffer, currentTime, throwableStackTraceElements);
                          }
                          ++totalNumberOfUnSharedConnections;
                          atleastOne = true;
                      }
                  }
              }
          } finally {
              mcToMCWMapWrite.unlock();
          }
  
          if (atleastOne) {
              aBuffer.append("  Total number of connection in unshared pool: ");
              aBuffer.append(totalNumberOfUnSharedConnections);
              aBuffer.append(nl);
          } else {
              aBuffer.append("  No unshared connections");
              aBuffer.append(nl);
          }
          int holdTimeLimit_loc_disabled = -1;
          if (localConnection_ != null) {
              displaySharedTLSConnections(aBuffer, connectionLeakBuffer, currentTime,
                                          holdTimeLimit_loc_disabled, throwableStackTraceElements);
              displayFreeTLSConnections(aBuffer, connectionLeakBuffer, currentTime,
                                        holdTimeLimit_loc_disabled, throwableStackTraceElements);
              displayUnsharedTLSConnections(aBuffer, connectionLeakBuffer, currentTime,
                                            holdTimeLimit_loc_disabled, throwableStackTraceElements);
          }
          // This is only for additional trace if needed.
          //    displayAllConnectionInPool(aBuffer, connectionLeakBuffer, currentTime,
          //    		holdTimeLimit_loc_disabled);
          int tscdSize = tscdList.size();
          if (tscdSize > 0) {
              aBuffer.append(nl + "Thread supported cleanup and destroy connection information" + nl);
              Object o = null;
              for (int i = 0; i < tscdList.size(); ++i) {
                  /*
                   * Print as many mcWrapper in the list as possible.
                   */
                  try {
                      o = tscdList.get(i);
                  } catch (IndexOutOfBoundsException e) {
                      /*
                       * If this occurs, the list size most likely changed.
                       */
                      break;
                  }
                  if (o != null) {
                      aBuffer.append("  " + o.toString());
                  }
              }
              aBuffer.append("  Total number of thread supported cleanup and destroy connections requests being processed: " + tscdSize + " (not included in total connection count)"
                             + nl);
          }
          /*
           * The initial length of the connectionLeakBuffer is 36.
           * If the length is larger than 36, we have added information
           * for the trace.
           */
          if (holdTimeLimit_loc > -1) {
              if (connectionLeakBuffer.length() > 0) {
                  aBuffer.append(nl);
                  aBuffer.append("Connection Leak Logic Information: (Note, applications using managed connections " +
                                 "in this list may not be following the recommended " +
                                 "getConnection(), use connection, close() connection " +
                                 " programming model pattern)" + nl);
                  aBuffer.append(connectionLeakBuffer);
              }
          }
          /*
           * All done return string buffer.
           */
          return aBuffer.toString();
  
      }