docs: public synchronized void rollback() throws HeuristicCommitException, HeuristicMixedException, HeuristicHazardException, SystemException
      {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "rollback", this);
  
          // Ensure timeout cannot rollback the underlying transaction
          ((DistributableTransaction) _transaction).addAssociation();
  
          boolean sysException = false;
  
          // Cancel any outstanding (in-doubt or transaction) timer
          EmbeddableTimeoutManager.setTimeout(_transaction, EmbeddableTimeoutManager.CANCEL_TIMEOUT, 0);
  
          final int state = _transaction.getTransactionState().getState();
          switch (state)
          {
              case TransactionState.STATE_ACTIVE:
              case TransactionState.STATE_PREPARED:
                  try
                  {
                      _transaction.getTransactionState().setState(TransactionState.STATE_ROLLING_BACK);
                  } catch (javax.transaction.SystemException se)
                  {
                      FFDCFilter.processException(se, "com.ibm.tx.remote.TransactionWrapper.rollback", "586", this);
                      if (tc.isDebugEnabled())
                          Tr.debug(tc, "Exception caught setting state to ROLLING_BACK!", se);
                      sysException = true;
                  }
  
                  try
                  {
                      // Resume the transaction created from the incoming
                      // request so that it is installed on the thread.
                      ((EmbeddableTranManagerSet) TransactionManagerFactory.getTransactionManager()).resume(_transaction);
  
                      _transaction.internalRollback();
                      _transaction.notifyCompletion();
                  } catch (HeuristicMixedException hme)
                  {
                      // No FFDC code needed.
                      _heuristic = StatefulResource.HEURISTIC_MIXED;
                  } catch (HeuristicHazardException hhe)
                  {
                      // No FFDC code needed.
                      _heuristic = StatefulResource.HEURISTIC_HAZARD;
                  } catch (HeuristicCommitException hce)
                  {
                      // No FFDC code needed.
                      _heuristic = StatefulResource.HEURISTIC_COMMIT;
                  } catch (Throwable exc) // javax.transaction.SystemException
                  {
                      FFDCFilter.processException(exc, "com.ibm.tx.remote.TransactionWrapper.rollback", "610", this);
                      Tr.error(tc, "WTRN0071_ROLLBACK_FAILED", exc);
                      _transaction.notifyCompletion();
                      sysException = true;
                  }
                  break;
  
              // If the transaction that this object represents has already been completed,
              // raise a heuristic exception if necessary.  This object must wait for a
              // forget before destroying itself if it returns a heuristic exception.
  
              case TransactionState.STATE_HEURISTIC_ON_ROLLBACK:
              case TransactionState.STATE_ROLLED_BACK:
                  // Return last heuristic value and allow for recovery
                  _heuristic = _transaction.getResources().getHeuristicOutcome();
                  break;
  
              case TransactionState.STATE_ROLLING_BACK:
                  // We should only get in this state if we are in recovery and this
                  // inbound rollback arrives.  In other cases, if we are rolling back
                  // we will hold out using the association counts and if we are
                  // locally retrying we will be in a heuristic state as we returned
                  // heuristic hazard to the superior.
                  ((DistributableTransaction) _transaction).removeAssociation();
                  final TRANSIENT tre = new TRANSIENT();
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "rollback", tre);
                  throw tre;
  
              case TransactionState.STATE_COMMITTING:
              case TransactionState.STATE_HEURISTIC_ON_COMMIT:
              case TransactionState.STATE_COMMITTED:
                  // Admin heuristic commit ...
                  // again retry ... respond with heurcom
                  _heuristic = StatefulResource.HEURISTIC_COMMIT;
                  break;
  
              case TransactionState.STATE_NONE:
                  // Transaction has completed and is now finished
                  // Normally the remoteable object would be disconnected from the orb,
                  // but ... timing may mean get got here while it was happenning
                  // We could just return ok, but it is more true to return exception
                  ((DistributableTransaction) _transaction).removeAssociation();
                  final OBJECT_NOT_EXIST one = new OBJECT_NOT_EXIST();
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "rollback", one);
                  throw one;
  
              default:
                  Tr.error(tc, "WTRN0072_ROLLBACK_BAD_STATE", TransactionState.stateToString(state));
                  sysException = true;
                  _transaction.notifyCompletion();
                  break;
          } // end switch
  
          ((DistributableTransaction) _transaction).removeAssociation();
  
          switch (_heuristic)
          {
              case StatefulResource.NONE:
                  break;
  
              case StatefulResource.HEURISTIC_HAZARD:
  //                _transaction.addHeuristic();
                  final HeuristicHazardException hh = new HeuristicHazardException();
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "rollback", hh);
                  throw hh;
  
              case StatefulResource.HEURISTIC_COMMIT:
  //                _transaction.addHeuristic();
                  final HeuristicCommitException hc = new HeuristicCommitException();
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "rollback", hc);
                  throw hc;
  
              default:
  //                _transaction.addHeuristic();
                  final HeuristicMixedException hm = new HeuristicMixedException();
                  if (tc.isEntryEnabled())
                      Tr.exit(tc, "rollback", hm);
                  throw hm;
          }
  
          if (sysException)
          {
              // destroy();
              final INTERNAL ie = new INTERNAL(MinorCode.LOGIC_ERROR, null);
              if (tc.isEntryEnabled())
                  Tr.exit(tc, "rollback", ie);
              throw ie;
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "rollback");
      }