@Override public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException { Set<Class<?>> annotatedClasses = new HashSet<Class<?>>(); if (classes != null) { annotatedClasses.addAll(classes); } servletContext.setAttribute(ANNOTATED_CLASSES, annotatedClasses); boolean appHasSomeJsfContent = appMayHaveSomeJsfContent(classes, servletContext); boolean appHasFacesServlet = getExistingFacesServletRegistration(servletContext) != null; if (appHasSomeJsfContent || appHasFacesServlet) { InitFacesContext initFacesContext = new InitFacesContext(servletContext); try { if (appHasSomeJsfContent) { // Only look at mapping concerns if there is JSF content handleMappingConcerns(servletContext); } // Other concerns also handled if there is an existing Faces Servlet mapping handleWebSocketConcerns(servletContext); } finally { // Bug 20458755: The InitFacesContext was not being cleaned up, resulting in // a partially constructed FacesContext being made available // to other code that re-uses this Thread at init time. initFacesContext.releaseCurrentInstance(); initFacesContext.release(); } } }
@Override public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException { Set<Class<?>> annotatedClasses = new HashSet<Class<?>>(); if (classes != null) { annotatedClasses.addAll(classes); } servletContext.setAttribute(ANNOTATED_CLASSES, annotatedClasses); boolean appHasSomeJsfContent = appMayHaveSomeJsfContent(classes, servletContext); boolean appHasFacesServlet = getExistingFacesServletRegistration(servletContext) != null; if (appHasSomeJsfContent || appHasFacesServlet) { InitFacesContext initFacesContext = new InitFacesContext(servletContext); try { if (appHasSomeJsfContent) { // Only look at mapping concerns if there is JSF content handleMappingConcerns(servletContext); } // Other concerns also handled if there is an existing Faces Servlet mapping handleWebSocketConcerns(servletContext); } finally { // Bug 20458755: The InitFacesContext was not being cleaned up, resulting in // a partially constructed FacesContext being made available // to other code that re-uses this Thread at init time. initFacesContext.releaseCurrentInstance(); initFacesContext.release(); } } }
@Override public void onStartup(Set<Class<?>> classes, ServletContext servletContext) throws ServletException { Set<Class<?>> annotatedClasses = new HashSet<Class<?>>(); if (classes != null) { annotatedClasses.addAll(classes); } servletContext.setAttribute(ANNOTATED_CLASSES, annotatedClasses); boolean appHasSomeJsfContent = appMayHaveSomeJsfContent(classes, servletContext); boolean appHasFacesServlet = getExistingFacesServletRegistration(servletContext) != null; if (appHasSomeJsfContent || appHasFacesServlet) { InitFacesContext initFacesContext = new InitFacesContext(servletContext); try { if (appHasSomeJsfContent) { // Only look at mapping concerns if there is JSF content handleMappingConcerns(servletContext); } // Other concerns also handled if there is an existing Faces Servlet mapping servletContext.addListener(ConfigureListener.class); handleWebSocketConcerns(servletContext); } finally { // Bug 20458755: The InitFacesContext was not being cleaned up, resulting in // a partially constructed FacesContext being made available // to other code that re-uses this Thread at init time. initFacesContext.releaseCurrentInstance(); initFacesContext.release(); } } }
InitFacesContext initFacesContext = new InitFacesContext(servletContext); if (null == initFacesContext) { throw new ServletException("Unable to initialize Mojarra");
FacesContext initContext = new InitFacesContext(context); ApplicationAssociate .clearInstance(initContext.getExternalContext());
FacesContext context = new InitFacesContext(event.getServletContext()); ExceptionQueuedEventContext eventContext = new ExceptionQueuedEventContext(context, t); context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, eventContext);
FacesContext context = new InitFacesContext(event.getServletContext()); ExceptionQueuedEventContext eventContext = new ExceptionQueuedEventContext(context, t); context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, eventContext);
FacesContext context = new InitFacesContext(event.getServletContext()); ExceptionQueuedEventContext eventContext = new ExceptionQueuedEventContext(context, t); context.getApplication().publishEvent(context, ExceptionQueuedEvent.class, eventContext);
FacesContext context = new InitFacesContext(event.getServletContext()); ExceptionQueuedEventContext eventContext = new ExceptionQueuedEventContext(context, t);
e.printStackTrace(); } finally { FacesContext initContext = new InitFacesContext(servletContext); ApplicationAssociate.clearInstance(initContext.getExternalContext()); ApplicationAssociate.setCurrentInstance(null); InitFacesContext initContext = new InitFacesContext(servletContext); ReflectionUtils.initCache(Thread.currentThread().getContextClassLoader());
e.printStackTrace(); } finally { FacesContext initContext = new InitFacesContext(servletContext); ApplicationAssociate.clearInstance(initContext.getExternalContext()); ApplicationAssociate.setCurrentInstance(null); InitFacesContext initContext = new InitFacesContext(servletContext); ReflectionUtils.initCache(Thread.currentThread().getContextClassLoader());
e.printStackTrace(); } finally { FacesContext initContext = new InitFacesContext(servletContext); ApplicationAssociate.clearInstance(initContext.getExternalContext()); ApplicationAssociate.setCurrentInstance(null); InitFacesContext initContext = new InitFacesContext(servletContext); ReflectionUtils.initCache(Thread.currentThread().getContextClassLoader());
e.printStackTrace(); } finally { FacesContext initContext = new InitFacesContext(sc); ApplicationAssociate .clearInstance(initContext.getExternalContext()); FacesContext initContext = new InitFacesContext(sc); ReflectionUtils .initCache(Thread.currentThread().getContextClassLoader());
e.printStackTrace(); } finally { FacesContext initContext = new InitFacesContext(sc); ApplicationAssociate .clearInstance(initContext.getExternalContext()); FacesContext initContext = new InitFacesContext(sc); ReflectionUtils .initCache(Thread.currentThread().getContextClassLoader());
FacesContext initContext = new InitFacesContext(context); ReflectionUtils.initCache(Thread.currentThread().getContextClassLoader());
initContext = getInitFacesContext(context); if (initContext == null) { initContext = new InitFacesContext(context); } else { InitFacesContext.getThreadInitContextMap().put(Thread.currentThread(), initContext);
initContext = getInitFacesContext(context); if (initContext == null) { initContext = new InitFacesContext(context); } else { InitFacesContext.getThreadInitContextMap().put(Thread.currentThread(), initContext);
initContext = getInitFacesContext(context); if (initContext == null) { initContext = new InitFacesContext(context); } else { InitFacesContext.getThreadInitContextMap().put(Thread.currentThread(), initContext);
initContext = getInitFacesContext(context); if (null == initContext) { initContext = new InitFacesContext(context); } else { InitFacesContext.getThreadInitContextMap().put(Thread.currentThread(), initContext);
InitFacesContext initContext = new InitFacesContext(context);