code: private void notifyApplicationEventListeners(Collection<EJBModuleMetaDataImpl> modules, boolean started) throws RuntimeWarning { // F743-26072
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "notifyApplicationEventListeners: started=" + started);
  
          RuntimeWarning warning = null;
  
          for (EJBModuleMetaDataImpl mmd : modules) {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "notifying listeners in module: " + mmd.ivJ2EEName);
  
              List<EJBApplicationEventListener> listeners = mmd.ivApplicationEventListeners;
              if (listeners != null) {
                  for (EJBApplicationEventListener listener : listeners) {
                      try {
                          if (started) {
                              listener.applicationStarted(ivName);
                          } else {
                              listener.applicationStopping(ivName);
                          }
                      } catch (Throwable t) {
                          FFDCFilter.processException(t, CLASS_NAME + ".notifyApplicationEventListeners", "781", this);
                          if (isTraceOn && tc.isEventEnabled())
                              Tr.event(tc, listener + " threw unexpected throwable: " + t, t);
  
                          // Save the first exception to be rethrown.
                          if (warning == null) {
                              warning = new RuntimeWarning(t);
                          }
                      }
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "notifyApplicationEventListeners: exception=" + warning);
  
          if (warning != null) {
              throw warning;
          }
      }
docs: Notifies all application event listeners in the specified modules.
  
  @param modules
  the list of modules to notify
  @param started
  <tt>true</tt> if the application is started, or <tt>false</tt> if the
  application is stopping
  @throws RuntimeWarning
  if any listener throws an exception