docs: public TxContextChange setupLocalTxContext(EJBKey key) throws CSIException //d174358.1
      {
  
          LocalTransactionCoordinator suspendedLocalTx = null;
          Transaction suspendedGlobalTx = null; //LIDB1673.2.1.5
          LocalTransactionCoordinator activatedLocalTx = null;
          BeanMetaData bmd = ((BeanId) key).getHome().getBeanMetaData(key);
          int localTxBoundary = bmd._localTran.getBoundary();
  
          // See if global transaction is active on thread.
  
          Transaction globalTxCoord = getGlobalCoord(); //LIDB1673.2.1.5
  
          if (globalTxCoord != null) {
  
              // If sticky local tx exists for this bean, swap contexts.
              // Otherwise, leave global tx on thread.  Sticky local
              // transctions may only be present if this is an EJB 2.0 bean
              // with local transaction boundary set to ActivitySession.
              // For EJB 1.1, local transaction boundary may never be set to
              // ActivitySession.  This is enforced by a check in BeanMetaData.
  
              if (localTxBoundary == LocalTransactionSettings.BOUNDARY_ACTIVITY_SESSION) { //d135218
  
                  // see if this bean has a suspended sticky local tx
  
                  LocalTransactionCoordinator stickyLocalTx = stickyLocalTxTable.remove(key);
  
                  // If sticky local tx exists, swap contexts.  The contexts
                  // will be swapped back by teardownLocalTxContext.
  
                  if (stickyLocalTx != null) {
  
                      //174358.1-------------->
                      try { //d174358.1
                          suspendedGlobalTx = suspendGlobalTx(TIMEOUT_CLOCK_STOP);
                      } //d174358.1
                      catch (CSIException csie) //d174358.1
                      { //d174358.1
                          FFDCFilter.processException(csie, CLASS_NAME + ".setupLocalTxContext", "937", this);//d174358.3
  
                          stickyLocalTxTable.put(key, stickyLocalTx); //d174358.1
                          throw csie; //d174358.1
                      } //d174358.1
  
                      //<----------174358.1
                      resumeLocalTx(stickyLocalTx);
                      activatedLocalTx = stickyLocalTx;
                  }
              }
  
              // Else, there may be a local transaction context on the thread
  
          } else {
  
              // See if there is already a local tx context on the thread
  
              LocalTransactionCoordinator currentLocalTx = getLocalCoord();
  
              // See if this bean also has a sticky local tx.  Sticky local
              // transctions may only be present if this is an EJB 2.0 bean
              // with local transaction boundary set to ActivitySession.  For
              // EJB 1.1 beans, local tx boundary may not be set to ActivitySession.
              // This is enforced by a check in BeanMetaData.
  
              LocalTransactionCoordinator stickyLocalTx = null;
  
              if (localTxBoundary == LocalTransactionSettings.BOUNDARY_ACTIVITY_SESSION) { //d135218
  
                  stickyLocalTx = stickyLocalTxTable.remove(key);
              }
  
              if ((currentLocalTx != null) && (stickyLocalTx != null)) {
  
                  // Local tx exists on thread, but bean also has a sticky local tx
                  // so swap contexts now.  The contexts will be swapped back by
                  // teardownLocalTxContext.
  
                  suspendLocalTx();
                  suspendedLocalTx = currentLocalTx;
                  resumeLocalTx(stickyLocalTx);
                  activatedLocalTx = stickyLocalTx;
  
                  // If sticky local tx exists, but thread has no local tx resume sticky
                  // local tx.  The sticky local tx will be suspended again by
                  // teardownLocalTxContext.
  
              } else if ((currentLocalTx == null) && (stickyLocalTx != null)) {
  
                  resumeLocalTx(stickyLocalTx);
                  activatedLocalTx = stickyLocalTx;
  
                  // Otherwise, do nothing. The thread may have an existing local tx context
                  // or no transaction context at all.
  
              } else {
  
                  // do nothing
              }
  
          } // end if no global tx present
  
          return (new TxContextChange(suspendedLocalTx, suspendedGlobalTx, activatedLocalTx, key));
      }