docs: @Override
      public final synchronized void passivate() throws RemoteException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled()) // d144064
              Tr.entry(tc, "passivate: " + this);
  
          if (isTraceOn && tc.isDebugEnabled()) //d468174
          {
              Tr.debug(tc, "extended persistence context bindID = " + ivExPcContext);
          }
  
          long pmiCookie = -1; //d177661.1
  
          // beans can be passivated only between Xactions and not in a tx
          if (state == TX_IN_METHOD || state == TX_METHOD_READY) {
              if (isTraceOn && tc.isEventEnabled()) // d144064
                  Tr.event(tc, "State: " + StateStrs[state] +
                               " Bean cannot be passivated in a transaction");
              throw new BeanOPassivationFailureException();
          }
          setState(METHOD_READY, PASSIVATING);
  
          String lifeCycle = null; // d367572.7
          CallbackContextHelper contextHelper = null; // d399469, d630940
  
          try {
              if (pmiBean != null) { //lidb1117.4
                  pmiCookie = pmiBean.passivationTime();
              }
  
              if (ivCallbackKind != CallbackKind.None) {
                  contextHelper = new CallbackContextHelper(this);
                  beginLifecycleCallback(LifecycleInterceptorWrapper.MID_PRE_PASSIVATE,
                                         contextHelper, CallbackContextHelper.Contexts.All);
  
                  // Invoke the PrePassivate callback if any needs to be called.
                  if (ivCallbackKind == CallbackKind.SessionBean) {
                      if (isTraceOn && // d527372
                          TEBeanLifeCycleInfo.isTraceEnabled()) // d367572.7
                      {
                          lifeCycle = "ejbPassivate";
                          TEBeanLifeCycleInfo.traceEJBCallEntry(lifeCycle); // d161864
                      }
                      sessionBean.ejbPassivate();
                  } else if (ivCallbackKind == CallbackKind.InvocationContext) {
                      // Invoke the PrePassivate interceptor methods.
                      BeanMetaData bmd = home.beanMetaData;
                      InterceptorMetaData imd = bmd.ivInterceptorMetaData; //d450431
                      InterceptorProxy[] proxies = imd.ivPrePassivateInterceptors;
                      if (proxies != null) {
                          if (isTraceOn && // d527372
                              TEBeanLifeCycleInfo.isTraceEnabled()) // d367572.7
                          {
                              lifeCycle = "PrePassivate";
                              TEBeanLifeCycleInfo.traceEJBCallEntry(lifeCycle); // d161864
                          }
                          InvocationContextImpl<?> inv = getInvocationContext();
                          inv.doLifeCycle(proxies, bmd._moduleMetaData); //d450431, F743-14982
                      }
                  }
              }
  
              // If uninstalling this bean class, do not write this bean
              // instance out to a file, as it would just be deleted.         d112866
              if (!uninstalling)
                  passivator.passivate(this, home.beanMetaData); // d648122
  
          } catch (RemoteException ex) {
              FFDCFilter.processException(ex, CLASS_NAME + ".passivate", "425", this);
              pmiCookie = -1;//lidb1117.4
              if (isTraceOn && tc.isEventEnabled()) // d144064
                  Tr.event(tc, "passivate failed! ",
                           new Object[] { this, ex });
              throw ex;
          } finally {
              if (lifeCycle != null) // d367572.7
              {
                  TEBeanLifeCycleInfo.traceEJBCallExit(lifeCycle); // d367572.7
              }
  
              if (contextHelper != null) {
                  contextHelper.complete(true);
              }
  
              if (pmiBean != null) {
                  pmiBean.passivationTime(pmiCookie);
              }
  
              setState(PASSIVATING, PASSIVATED);
              ivTimeoutElement.passivated = true; // F61004.5
  
              // Finally, transition the beanO to the destroyed state, without
              // calling ejbRemove.                                           d730409
              destroyNotRemove();
          }
  
          if (isZOS && !removeServantRoutingAffinity()) // d646413.2
          {
              throw new InvalidBeanOStateException("Could not DEQ session bean with key = " + beanId.getPrimaryKey());
          }
  
          if (isTraceOn && tc.isEntryEnabled()) // d144064
              Tr.exit(tc, "passivate: " + getStateName(state));
      }