jee5-support-modules/openwebbeans-support/src/main/java/org/apache/myfaces/extensions/cdi/openwebbeans/startup/WebBeansAwareConfigurationListener.java [124:161]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void broadcastStartup()
    {
        if(!isActivated())
        {
            return;
        }
        
        if (isInitialized())
        {
            return;
        }

        logger.info("Controlled MyFaces ExtCDI bootstrapping.");

        //In this case the JSF impl has been invoked too soon

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (facesContext != null && facesContext.getExternalContext() != null)
        {
            ServletContext servletContext = (ServletContext) facesContext.getExternalContext().getContext();

            //force bootstrapping of OWB
            contextInitialized(new ServletContextEvent(servletContext));
        }
        markAsInitialized();
    }

    protected void markAsInitialized()
    {
        initialized.put(getClassLoader(), Boolean.TRUE);
    }

    protected boolean isInitialized()
    {
        ClassLoader classLoader = getClassLoader();

        return Boolean.TRUE.equals(initialized.get(classLoader));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



jee5-support-modules/weld-support/src/main/java/org/apache/myfaces/extensions/cdi/weld/startup/WeldAwareConfigurationListener.java [66:103]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void broadcastStartup()
    {
        if(!isActivated())
        {
            return;
        }
        
        if (isInitialized())
        {
            return;
        }

        logger.info("Controlled MyFaces ExtCDI bootstrapping.");

        //In this case the JSF impl has been invoked too soon

        FacesContext facesContext = FacesContext.getCurrentInstance();

        if (facesContext != null && facesContext.getExternalContext() != null)
        {
            ServletContext servletContext = (ServletContext) facesContext.getExternalContext().getContext();

            //force bootstrapping of Weld
            contextInitialized(new ServletContextEvent(servletContext));
        }
        markAsInitialized();
    }

    protected void markAsInitialized()
    {
        initialized.put(getClassLoader(), Boolean.TRUE);
    }

    protected boolean isInitialized()
    {
        ClassLoader classLoader = getClassLoader();

        return Boolean.TRUE.equals(initialized.get(classLoader));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



