docs: private EJBException mapCSIException(EJSDeployedSupport s, CSIException e, Exception rootEx)
      {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "mapCSIException: " + e);
          }
  
          String message = " ";
          EJBException ejbex;
          if (e instanceof CSITransactionRolledbackException)
          {
              //445903 start: We must look for a HeuristicMixedException nested in the CSITransactionRolledbackException
              //and if found, make sure it is nested in a RemoteException so the user will see the HeuristicMixedException.
              //If we throw a TransactionRolledbackException with the HeuristicMixedException nested within it, or if we
              //throw only the TransactionRolledbackException (pre-d445903), this will give the impression that the transaction
              //has been rolledback.  However, by its definition, a HeuristicMixedException indicates that some updates/resources
              //have been committed and other may have been committed.  As such, throwing only a TransactionRolledbackException
              //or TransactionRolledbackException + HeuristicMixedException can be misleading.
              //
              //PK87857 note: When this APAR was put in earlier releases, the 'instanceof' check for HME was included in the
              //same 'if' check as is included in the 'else if' block to follow.  However, in v7.0 dev, the following 'if'
              //block was added via d445903.  As such, we must leave this code 'as-is' so as not to regress anyone.  It
              //should also be noted that this 'if' block is a potential spec violation.  That is, if the HME is caused by
              //a component other than the Tx 'beginner', the EJBException + HME will flow back up stream rather than the
              //spec mandated TransactionRolledbackLocalException; needless to say this causes a spec violation.
              if (e.detail instanceof HeuristicMixedException) {
                  //Nest the HeuristicMixedException in an EJBException.
                  ejbex = ExceptionUtil.EJBException(message, rootEx);
              }
              //PK87857: We must look for a HeuristicRollbackException nested in the
              //CSITransactionRolledbackException and if found, we must make sure it is nested in an
              //EJBException so the user will see the Heuristic Exception.  Let me explain why this should be done:
              //  If we throw a TransactionRolledbackLocalException with the HeuristicRollbackException nested within
              //  it, or if we throw only the TransactionRolledbackLocalException (pre-PK87857), this will give the
              //  impression that the transaction has been rolledback.  In the case of a HeuristicRollbackException, the
              //  transaction has been rolledback so a TransactionRolledbackLocalException is valid, however, it may be
              //  important for the user to know that a Heuristic decision was made to rollback the transaction.
              else if (IncludeNestedExceptionsExtended
                       && (s.began || AllowSpecViolationOnRollback)
                       && (e.detail instanceof HeuristicRollbackException)) {
                  //Nest the Heuristic Exception in an EJBException.
                  ejbex = ExceptionUtil.EJBException(message, rootEx);
              }
              else {
                  ejbex = new TransactionRolledbackLocalException(message, rootEx);
              }
              //445903 end
          }
          else if (e instanceof CSIAccessException)
          {
              ejbex = new AccessLocalException(message, rootEx);
          }
          else if (e instanceof CSIInvalidTransactionException)
          {
              ejbex = new InvalidTransactionLocalException(message, rootEx);
          }
          else if (e instanceof CSINoSuchObjectException)
          {
              ejbex = new NoSuchObjectLocalException(message, rootEx);
          }
          else if (e instanceof CSITransactionRequiredException)
          {
              ejbex = new TransactionRequiredLocalException(message);
          }
          //        else if (e instanceof CSIInvalidActivityException)
  //        {
  //            ejbex = new InvalidActivityLocalException(message, rootEx);
  //        }
  //        else if (e instanceof CSIActivityRequiredException)
  //        {
  //            ejbex = new ActivityRequiredLocalException(message, rootEx);
  //        }
  //        else if (e instanceof CSIActivityCompletedException)
  //        {
  //            ejbex = new ActivityCompletedLocalException(message, rootEx);
  //        }
          else if (rootEx instanceof EJBException)
          {
              ejbex = (EJBException) rootEx;
          }
          else
          {
              // Spec requires an EJBException; there is no longer any value add in
              // using the deprecated nested exception interface.            F71894.1
              ejbex = ExceptionUtil.EJBException(rootEx);
          }
  
          // EJBException doesn't normally set the cause on Throwable, so
          // let's do that to be nice :-)                                    d354591
          // Geronimo EJBException.getCause returns getCausedbyException, so
          // we do not expect this code to be used.                           F53643
          if (rootEx != null &&
              rootEx != ejbex &&
              ejbex.getCause() == null)
          {
              ejbex.initCause(rootEx);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "mapCSIException returning: " + ejbex);
          }
  
          return ejbex;
      }