docs: @Override
      protected void initialize(boolean reactivate) // d367572
                      throws RemoteException, InvocationTargetException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.entry(tc, "initialize");
          }
          passivator = container.passivator;
          state = PRE_CREATE;
  
          // d367572.1 start
          BeanMetaData bmd = home.beanMetaData;
          ivSfFailoverClient = bmd.ivSfFailoverClient; //LIDB2018-1
  
          EJSDeployedSupport methodContext = null;
  
          // Activating or Creating a new SFSB?
          if (reactivate) {
              if (isTraceOn && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Initialize called for a passivated SFSB: " + this); // d367572.7
              }
  
              // Indicate the bean is being activated, not created...
              // i.e. ejbActivate will be called, not ejbCreate.              d159152
              setState(ACTIVATING);
          } else {
              CallbackContextHelper contextHelper = null;
              try {
                  if (isTraceOn && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Initialize called for a new SFSB: " + this); // d367572.7
                  }
  
                  // d515803
                  if (bmd.ivHasCMExtendedPersistenceContext) {
                      ivExPcContext = container.getEJBRuntime().getEJBJPAContainer().onCreate(bmd.j2eeName.toString(),
                                                                                              bmd.usesBeanManagedTx,
                                                                                              bmd.ivExPcPuIds,
                                                                                              bmd.ivJpaPuIdSTUnsyncSet);
                  }
  
                  if (isTraceOn && tc.isDebugEnabled())
                      Tr.debug(tc, "Extended PC = " + ivExPcContext);
  
                  // Note that the local transaction surrounds injection methods and
                  // PostConstruct lifecycle callbacks.
                  contextHelper = new CallbackContextHelper(this); //528073, d578360
                  contextHelper.begin(CallbackContextHelper.Tx.CompatLTC,
                                      CallbackContextHelper.Contexts.CallbackBean);
  
                  // Save the BeanO being created in the method context for
                  // extended-scoped persistence context management. The ExPc of the
                  // bean being created may need to be inherited by any SF beans that
                  // are created during injection.                             d515803
                  methodContext = EJSContainer.getMethodContext();
                  if (methodContext != null)
                      methodContext.ivCreateBeanO = this;
  
                  // F743-21481
                  // Moved the creation/injection of the interceptor classes after the
                  // methodContext work done directly above, because the comment on it
                  // implies this must be done before interceptor classes are injected.
  
                  InterceptorMetaData imd = bmd.ivInterceptorMetaData;
                  createInterceptorsAndInstance(contextHelper);
  
                  // Now set the SessionContext and/or do the dependency injection.
                  // Note that dependency injection must occur while in PRE_CREATE state.
                  injectInstance(ivManagedObject, ivEjbInstance, this);
  
                  //------------------------------------------------------------------
                  // Stateful session beans need to have their id's set here so that
                  // the wrapper is valid if ejbCreate() or PostConstruct calls
                  // getEJBObject() or getBusinessObject().
                  // Note: if activating, caller will set the correct id.      d451399
                  //------------------------------------------------------------------
                  setId(new BeanId(home, EJSContainer.sessionKeyFactory.create(), false));
  
                  ivTimeoutElement = new TimeoutElement(beanId, getSessionTimeoutInMilliSeconds()); // F61004.5
  
                  // Directly create the wrapper so we can cache bean<->wrapper.
                  // Stateful beans are created with a unique primary key, so they
                  // should not exist in the wrapper cache at this point.  However,
                  // a call to getEJBObject, getEJBLocalObject, or getBusinessObject
                  // would cause the wrapper to be added to the cache, so we do this
                  // before calling the PostConstruct method.                  d729903
                  ivWrapperCommon = container.wrapperManager.createWrapper(this);
  
                  //------------------------------------------------------------------
                  // Now that the SessionContext is set and/or dependencies
                  // injection has occurred, change state to CREATING state to allow
                  // additional methods to be called by the ejbCreate or
                  // PostConstruct interceptor methods (e.g. getEJBObject).
                  // This ensures CMVC defect 70091 is not reintroduced.
                  //------------------------------------------------------------------
                  setState(CREATING); // d367572.4
  
                  // Determine the kind of life cycle callback to make if any. Note,
                  // if CallbackKind is SessionBean, then the generated ejbdeploy wrapper
                  // for a SFSB 1.x or 2.x bean will make the ejbCreate call and throw
                  // the correct exception when necessary. Therefore, this code does not
                  // need to handle that case.
                  if (imd != null && ivCallbackKind == CallbackKind.InvocationContext) {
                      boolean globalTx = isLifecycleCallbackGlobalTx(LifecycleInterceptorWrapper.MID_POST_CONSTRUCT);
                      if (globalTx) {
                          // Complete the local transaction used for injection.
                          // Null the field so that if complete() fails it won't
                          // be called again from the finally block.
                          CallbackContextHelper injectionContextHelper = contextHelper;
                          contextHelper = null;
                          injectionContextHelper.complete(true);
  
                          if (isTraceOn && tc.isDebugEnabled())
                              Tr.debug(tc, "completed injection contexts, begin PostConstruct contexts");
  
                          // Begin the global transaction for the callback.
                          contextHelper = new CallbackContextHelper(this);
                          contextHelper.begin(CallbackContextHelper.Tx.Global,
                                              CallbackContextHelper.Contexts.CallbackBean);
                      }
  
                      // This is a 3.x SFSB that may have one or more PostConstruct interceptors
                      // methods. Invoke PostContruct interceptors if there is at least 1
                      // PostConstruct interceptor.
                      InterceptorProxy[] proxies = imd.ivPostConstructInterceptors;
                      if (proxies != null) {
                          callLifecycleInterceptors(proxies, LifecycleInterceptorWrapper.MID_POST_CONSTRUCT); // F743-1751
                      }
                  }
              } // d367572.1 end
              finally // d399469
              {
                  //TODO: Jim,  This code will need to change to account for
                  // the possibility of a "sticky" global tran (UserTransaction)
                  // that may have been started in the Callback methods when
                  // the BeanO is Bean-Managed.
  
                  // Clear the create beano if set above                          d515803
                  if (methodContext != null) {
                      methodContext.ivCreateBeanO = null;
                  }
  
                  // Resume the TX context if it was suspended.
                  if (contextHelper != null) // d399469
                  {
                      contextHelper.complete(true);
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.exit(tc, "initialize"); // d367572.7
          }
      }