code: public String getXAExceptionContents(XAException x) {
          StringBuilder xsb = new StringBuilder(200);
          Throwable cause = x.getCause();
          if (cause != null) {
              String EOLN = AdapterUtil.EOLN;
              xsb.append(EOLN).append("Caused by ").append(cause.getClass().getName()).append(": ").append(cause.getMessage()).append(EOLN);
              if (cause instanceof SQLException) {
                  SQLException sqlX = (SQLException) cause;
                  xsb.append("The error code is: ").append(sqlX.getErrorCode()).append(EOLN);
                  xsb.append("The SQL State is: ").append(sqlX.getSQLState()).append(EOLN);
              }
          }
          return (xsb.toString());
      }
docs: This method provides a plug-in point for providing meaningful logging information for an
  <code>XAException</code>. The information can include details of the original
  exception that caused the <code>XAException</code>, if applicable.
  We use this method to obtain trace information for <code>XAException</code>.
  
  @param xae the <code>XAException</code>.
  @return detailed information about the <code>XAException</code>, for inclusion in trace.