code: synchronized void deactivateEndpoint(MessageEndpointFactoryImpl mef) {
          if (mef.adminObjectServiceInfo != null) {
              mef.adminObjectServiceInfo.removeReferencingEndpoint(mef);
              cleanupAdminObjectServiceInfo(mef.adminObjectServiceInfo);
          }
  
          if (mef.schemeJndiNameInfo != null) {
              mef.schemeJndiNameInfo.removeReferencingEndpoint(mef);
              schemeJndiNames.remove(mef.schemeJndiNameInfo.getBMD().j2eeName);
          }
  
          mef.endpointActivationServiceInfo.removeReferencingEndpoint(mef);
          cleanupEndpointActivationServiceInfo(mef.endpointActivationServiceInfo);
  
          endpointFactories.remove(mef);
  
          if (mef.runtimeActivated) {
              deactivateEndpointInternal(mef);
          }
      }
docs: Coordinates all of the resources necessary for removal and deactivation
  of endpoints. <p>
  
  This method controls proper synchronization, to insure the necessary
  state of all the required resources services. <p>
  
  @param mef message endpoint factory to activate
  @throws ResourceException if a failure occurs deactivating the endpoint