code: private boolean loadFacesInitPluginsJDK6()
      {
          String[] pluginEntries = null;
          try
          {
              Class serviceLoader = ClassUtils.getContextClassLoader().loadClass("java.util.ServiceLoader");
              Method m = serviceLoader.getDeclaredMethod("load", Class.class, ClassLoader.class);
              Object loader = m.invoke(serviceLoader, StartupListener.class, ClassUtils.getContextClassLoader());
              m = loader.getClass().getDeclaredMethod("iterator");
              Iterator<StartupListener> it = (Iterator<StartupListener>) m.invoke(loader);
              List<StartupListener> listeners = new LinkedList<StartupListener>();
              if (!it.hasNext())
              {
                  return false;
              }
              while (it.hasNext())
              {
                  listeners.add(it.next());
              }
              //StartupListener[] listeners1 = listeners.toArray(new StartupListener[listeners.size()]);
              _servletContext.setAttribute(FACES_INIT_PLUGINS, listeners);
              return true;
          }
          catch (ClassNotFoundException e)
          {
  
          }
          catch (NoSuchMethodException e)
          {
              log.log(Level.SEVERE, e.getMessage(), e);
          }
          catch (InvocationTargetException e)
          {
              log.log(Level.SEVERE, e.getMessage(), e);
          }
          catch (IllegalAccessException e)
          {
              log.log(Level.SEVERE, e.getMessage(), e);
          }
          return false;
      }
docs: loads the faces init plugins per reflection and Service loader
  in a jdk6 environment
  
  @return false in case of a failed attempt or no listeners found
  which then will cause the jdk5 context.xml code to trigger