docs: @Trivial
      @FFDCIgnore({ ResourceException.class, Throwable.class })
      protected void activateEndpointInternal(EndpointActivationService eas, int maxEndpoints, AdminObjectService adminObjSvc) throws ResourceException {
          boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "MEF.activateEndpointInternal for MDB " + beanMetaData.enterpriseBeanName + "(" + eas + ", " + maxEndpoints + ")");
  
          boolean activate;
          Object asInstance = null;
          ResourceException rex = null;
          EJBThreadData threadData = EJSContainer.getThreadData();
          threadData.pushMetaDataContexts(beanMetaData);
          try {
              synchronized (ivStateLock) {
                  if (ivState == INACTIVE_STATE) {
                      activate = true;
                      ivState = ACTIVATING_STATE;
                      ivActivatingThread = Thread.currentThread();
                  } else if (ivState == ACTIVE_STATE) {
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "endpoint already active");
                      activate = false;
                  } else {
                      activate = false;
                      rex = new ResourceException("can not activate until deactivate completes");
                  }
              }
  
              if (activate) {
                  asInstance = eas.activateEndpoint(this,
                                                    beanMetaData.ivActivationConfig,
                                                    beanMetaData.ivActivationSpecAuthAlias,
                                                    beanMetaData.ivMessageDestinationJndiName,
                                                    adminObjSvc,
                                                    adminObjectServiceInfo == null ? null : adminObjectServiceInfo.id);
  
                  // Save key required to deactivate endpoint and change to the ACTIVE
                  // state. Note that traditional WAS defers the move to ACTIVE until the application
                  // has started to block createEndpoint calls, but that doesn't work well
                  // with dynamic configuration updates. Instead of blocking on state,
                  // Liberty blocks on checkIfEJBWorkAllowed.
                  synchronized (ivStateLock) {
                      activationSpec = asInstance;
  
                      // Set the state and notify waiting threads.
                      ivState = ACTIVE_STATE;
                      ivStateLock.notifyAll();
                  }
  
                  setRRSTransactional();
                  setMaxEndpoints(maxEndpoints);
  
                  // TODO : enable this info message in the future when the text can be improved
                  //        the endpoint wont truly be active until the jms connection is obtained
                  // Tr.info(tc, "MDB_ENDPOINT_ACTIVATED_CNTR4013I", beanMetaData.enterpriseBeanName);
              }
          } catch (ResourceException ex) {
              synchronized (ivStateLock) {
                  ivState = INACTIVE_STATE;
                  activationSpec = null;
                  unsetRecoveryID();
              }
              rex = ex;
          } catch (Throwable ex) {
              synchronized (ivStateLock) {
                  ivState = INACTIVE_STATE;
                  activationSpec = null;
                  unsetRecoveryID();
              }
              rex = new ResourceException(ex);
          } finally {
              threadData.popMetaDataContexts();
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "MEF.activateEndpointInternal for MDB " + beanMetaData.enterpriseBeanName, rex);
  
          if (rex != null) {
              throw rex;
          }
      }