docs: protected void closeSurrogate() throws Throwable {
  
          if (this.surrogateClosed) {
              return;
          }
  
          if (this.resultSets != null) {
              Iterator it = this.resultSets.iterator();
  
              // Changed to set of ResultSet invocation handlers so
              // that handler resources can be cleaned up too.
              while (it.hasNext()) {
                  WrapperInvocationHandler handler =
                      (WrapperInvocationHandler) it.next();
  
                  try {
                      ((ResultSet) handler.delegate).close();
                  } catch (Exception ex) {}
  
                  try {
                      handler.closeSurrogate();
                  } catch (Exception e) {}
              }
          }
  
          if (this.statements != null) {
              Iterator it = this.statements.iterator();
  
              while (it.hasNext()) {
                  WrapperInvocationHandler handler =
                      (WrapperInvocationHandler) it.next();
  
                  try {
                      handler.closeSurrogate();
                  } catch (Exception e) {}
              }
          }
  
          if (this.dbmdHandler != null) {
              try {
                  this.dbmdHandler.closeSurrogate();
              } catch (Throwable ex) {}
          }
  
          Object delegate = this.delegate;
  
          try {
              if (delegate instanceof Connection) {
                  closeConnectionSurrogate();
              } else if (delegate instanceof Statement) {
                  closeStatementSurrogate();
              }
          } finally {
              this.delegate        = null;
              this.surrogate       = null;
              this.dbmdHandler     = null;
              this.parentHandler   = null;
              this.statementKey    = null;
              this.statementPool   = null;
              this.connectionPool  = null;
              this.surrogateClosed = true;
          }
      }