docs: private void uninstall(EJBModuleMetaDataImpl mmd, boolean unbindNow) throws RuntimeWarning //d210058
      {//d130898
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "uninstall", mmd.getJ2EEName());
  
          RuntimeWarning warning = null;
          EJBApplicationMetaData ejbAMD = mmd.getEJBApplicationMetaData();
          String appName = mmd.ivAppName; //497716.5.1
  
          NameSpaceBinder<?> binder = createNameSpaceBinder(mmd); // F69147.2
  
          try {
              binder.beginUnbind(unbindNow); // F69147.2
  
              try {
                  deregisterMBeans(mmd);
              } catch (Throwable t) { // 210058
                  FFDCFilter.processException(t, CLASS_NAME + ".uninstall", "2623", this);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Exception caught during uninstall (deregisterMBeans).  Uninstall continues:  ", t);
                  if (warning == null) {
                      warning = new RuntimeWarning(t); // 210058 set warning to last exception
                  }
              }
  
              for (BeanMetaData bmd : mmd.ivBeanMetaDatas.values()) {
                  J2EEName j2eeName = bmd.j2eeName;
  
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "stopping bean " + j2eeName);
  
                  try {
                      stopBean(bmd); // F743-26072
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                          Tr.debug(tc, "Bean stopped; no exceptions thrown");
                      }
                  } catch (Throwable e) {
                      FFDCFilter.processException(e, CLASS_NAME + ".uninstall", "1039", this);
                      Throwable nestedExc = getNestedException(e);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          Tr.debug(tc, "Exception:", e);
                      if (warning == null) {
                          warning = new RuntimeWarning(nestedExc); // 210058 set warning to last exception
                      }
                  }
  
                  HomeRecord hr = bmd.homeRecord;
                  if (hr.ivJavaGlobalBindings != null) {
                      try {
                          binder.unbindJavaGlobal(hr.ivJavaGlobalBindings); // F743-26137, F69147.2
                      } catch (NamingException ex) {
                          FFDCFilter.processException(ex, CLASS_NAME + ".uninstall", "1006", this);
                          if (warning == null) {
                              warning = new RuntimeWarning(ex);
                          }
                      }
                  }
  
                  // Unbind from java:global.  If the app is stopping anyway,
                  // then don't bother since the namespace will be destroyed.
                  if (hr.ivJavaAppBindings != null && !ejbAMD.isStopping()) {
                      try {
                          binder.unbindJavaApp(hr.ivJavaAppBindings); // F743-26137, F69147.2
                      } catch (NamingException ex) {
                          FFDCFilter.processException(ex, CLASS_NAME + ".uninstall", "1066", this);
                          if (warning == null) {
                              warning = new RuntimeWarning(ex);
                          }
                      }
                  }
  
                  // No need to unbind from java:module since that namespace
                  // will be destroyed.
  
                  try {
                      binder.unbindBindings(hr); // F69147.2
                  } catch (NamingException ex) {
                      FFDCFilter.processException(ex, CLASS_NAME + ".uninstall", "2613", this);
                      if (warning == null) {
                          warning = new RuntimeWarning(ex);
                      }
                  }
  
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Bean uninstall sequence ending for: ", j2eeName);
                  }
              }
  
              // d465081 start // d510405
              // Remove the module map from the application map in the full set of MessageDestinationLinks
              Map<String, Map<String, String>> appMap = InjectionEngineAccessor.getMessageDestinationLinkInstance().getMessageDestinationLinks().get(appName); //d49167
              if (appMap != null) { //d475701
                  String moduleName = mmd.getJ2EEName().getModule();
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Remove module from appMap of MessageDestinationLinks : " + mmd.getJ2EEName());
                  appMap.remove(moduleName); // d462512
  
                  if (appMap.size() == 0) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          Tr.debug(tc, "Remove appMap from MessageDestinationLinks : " + appName);
                      InjectionEngineAccessor.getMessageDestinationLinkInstance().getMessageDestinationLinks().remove(appName); //d493167
                  } //d465081 end
              }
  
              // Unbind any EJBFactories that may have been bound during start.
              // There may be one per app, and one per module.                d440604
              try {
                  binder.unbindEJBFactory(); // F69147.2
              } catch (NamingException ex) {
                  if (warning == null) {
                      warning = new RuntimeWarning(ex);
                  }
              }
  
              try {
                  postInvokeStopModule(mmd);
              } catch (Throwable t) { // 210058
                  FFDCFilter.processException(t, CLASS_NAME + ".uninstall", "2730", this);
                  Throwable t2 = getNestedException(t);
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Exception caught during uninstall (moduleUninstalPostInvoke).  Uninstall continues:  ", t2);
                  if (warning == null) {
                      warning = new RuntimeWarning(t2); // 210058 set warning to last exception
                  }
              }
  
          } catch (Throwable t) {
              FFDCFilter.processException(t, CLASS_NAME + ".uninstall", "1069", this);
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "Exception:", t);
              warning = new RuntimeWarning(t); // 210058 set warning to last exception
  
          } finally {
              try {
                  binder.end(); // F69147.2
              } catch (NamingException ex) {
                  if (warning == null) {
                      warning = new RuntimeWarning(ex);
                  }
              }
          }
  
          if (warning != null) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                  Tr.exit(tc, "uninstall: " + warning);
              throw warning;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "uninstall");
      }