code: public void end(int endMode) throws InconsistentLocalTranException, RolledbackException,
      IllegalStateException
      {
      	if (tc.isEntryEnabled()) Tr.entry(tc, "end");
  
          if (_resolverIsCAB)
          {
              complete(endMode);
          }
          else
          {
              cleanup();
          }
  
          if (tc.isEntryEnabled()) Tr.exit(tc, "end");
      }
docs: Ends the LTC in a manner consistent with the resolver type - if the LTC is configured as
  being resolved by ContainerAtBoundary then the LTC is ended as described by the
  {@link #complete(int) complete}, if the LTC is configured as
  being resolved by Application then the LTC is ended as described by the
  {@link #cleanup cleanup}.
  Ends the association of the LTC scope with the thread.
  
  @param endMode The action to be taken when completing the OnePhaseXAResources enlisted
  with the coordinator. Possible values are:
  
  <UL>
  <LI>EndModeCommit</LI>
  <LI>EndModeRollBack</LI>
  </UL>
  @exception InconsistentLocalTranException
  Thrown when completion of a resource fails leaving the local
  transaction containment in an inconsistent state.
  @exception RolledbackException
  Thrown if EndModeCommit is specified but the LTC has been marked
  RollbackOnly. Any enlisted resources are rolled back.
  @exception IllegalStateException
  Thrown if the LocalTransactionCoordinator is not in a
  valid state to execute the operation, for example if
  the LocalTransactionCoordinator has already completed
  or if there is no LocalTransactionCoordinator associated
  with the current thread.