docs: public void begin(Tx beginTx, Contexts pushContexts) throws CSIException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "begin: tx=" + beginTx + ", contexts=" + pushContexts);
  
          ivThreadData = EJSContainer.getThreadData(); // d630940
          if (pushContexts == Contexts.All)
          {
              ivThreadData.pushContexts(ivBeanO);
          }
          else
          {
              ivThreadData.pushCallbackBeanO(ivBeanO);
          }
          ivPopContexts = pushContexts;
  
          ivSavedLifecycleContextData = ivThreadData.ivLifecycleContextData; // d644886
          ivThreadData.ivLifecycleContextData = null; // d644886
  
          ivSavedLifecycleMethodContextIndex = ivThreadData.ivLifecycleMethodContextIndex; // d644886
          ivThreadData.ivLifecycleMethodContextIndex = ivThreadData.getNumMethodContexts(); // d644886, RTC102449
  
          if (beginTx == Tx.CompatLTC) {
              beginTx = ivBeanO.home.beanMetaData.ivModuleVersion >= BeanMetaData.J2EE_EJB_VERSION_3_0 ? Tx.LTC : null;
          }
          ivSavedLifecycleMethodBeginTx = ivThreadData.ivLifecycleMethodBeginTx;
          ivThreadData.ivLifecycleMethodBeginTx = beginTx;
  
          if (beginTx != null) {
              // This duplicates logic from TranStrategy.
  
              if (ivUowToken != null)
              {
                  throw new CSIException("Cannot begin until prior TX is resumed");
              }
  
              // Get UOWCurrent from TransactionManagerFactory.
              UOWCurrent uowCurrent = EmbeddableTransactionManagerFactory.getUOWCurrent(); //d632706
  
              // Only suspend if there is a UOWCurrent.
              if (uowCurrent != null)
              {
                  // Suspend the current UOW.
                  try {
                      ivUowToken = ivBeanO.container.ivUOWManager.suspend(); // d578360
                      if (isTraceOn && tc.isEventEnabled()) {
                          Tr.event(tc, "Suspended TX/LTC cntxt: " + ivUowToken);
                      }
                  } catch (SystemException e) {
                      FFDCFilter.processException(e, CLASS_NAME + ".begin", "140", this);
                      throw new CSIException("Cannot begin due to failure in suspend.", e);
                  }
              }
  
              boolean ltc = beginTx == Tx.LTC;
              if (ltc) {
                  // Begin a new local TX for the unspecified TX context.
                  ivLocalTransactionCurrent = EmbeddableTransactionManagerFactory.getLocalTransactionCurrent();
                  ivLocalTransactionCurrent.begin();
  
                  if (isTraceOn && tc.isEventEnabled())
                  {
                      LocalTransactionCoordinator lCoord = ivLocalTransactionCurrent.getLocalTranCoord();
                      if (lCoord != null) {
                          Tr.event(tc, "Began LTC cntxt: tid=" +
                                       Integer.toHexString(lCoord.hashCode()) + "(LTC)");
                      } else {
                          Tr.event(tc, "Began LTC cntxt: " + "null Coordinator!");
                      }
                  }
              } else {
                  try {
                      ivTransactionManager = EmbeddableTransactionManagerFactory.getTransactionManager();
                      ivTransactionManager.begin();
  
                      if (isTraceOn && tc.isEventEnabled())
                          Tr.event(tc, "Began TX cntxt: " + ivTransactionManager.getTransaction()); //LIDB1673.2.1.5
                  } catch (Exception ex) {
                      FFDCFilter.processException(ex, CLASS_NAME + ".begin", "214", this);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
                          Tr.event(tc, "Begin global tx failed", ex);
                      throw new CSIException("Begin global tx failed", ex);
                  }
              }
  
              // d630940 - Make the container aware of the new transaction.
              ivBeanO.container.getCurrentTx((SynchronizationRegistryUOWScope) getUOWCoordinator(), ltc);
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "begin");
      }