public static LifecycleProviderFactory getLifecycleProviderFactory() { // Since we always provide a StartupFacesContext on initialization time, this is safe: return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext()); }
public static LifecycleProviderFactory getLifecycleProviderFactory() { // Since we always provide a StartupFacesContext on initialization time, this is safe: return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext()); }
public static LifecycleProviderFactory getLifecycleProviderFactory() { // Since we always provide a StartupFacesContext on initialization time, this is safe: return getLifecycleProviderFactory(FacesContext.getCurrentInstance().getExternalContext()); }
protected void doPreDestroy(Object value, String name, String scope) { if(value != null) { //AnnotatedManagedBeanHandler handler = // new AnnotatedManagedBeanHandler(value, scope, name); //handler.invokePreDestroy(); try { LifecycleProviderFactory.getLifecycleProviderFactory().getLifecycleProvider(null).destroyInstance(value); } catch (IllegalAccessException e) { log.error("", e); } catch (InvocationTargetException e) { log.error("", e); } } } }
protected ManagedBeanDestroyer getManagedBeanDestroyer(ExternalContext externalContext) { if (_mbDestroyer == null) { RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext); LifecycleProvider lifecycleProvider = LifecycleProviderFactory .getLifecycleProviderFactory(externalContext).getLifecycleProvider(externalContext); _mbDestroyer = new ManagedBeanDestroyer(lifecycleProvider, runtimeConfig); } return _mbDestroyer; } }
protected static ManagedBeanDestroyer getManagedBeanDestroyer(ExternalContext externalContext) { RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(externalContext); LifecycleProvider lifecycleProvider = LifecycleProviderFactory .getLifecycleProviderFactory(externalContext).getLifecycleProvider(externalContext); return new ManagedBeanDestroyer(lifecycleProvider, runtimeConfig); } }
.getLifecycleProviderFactory(externalContext).getLifecycleProvider(externalContext);
.getLifecycleProviderFactory(externalContext).getLifecycleProvider(externalContext);
.getLifecycleProviderFactory(externalContext).getLifecycleProvider(externalContext);
LifecycleProviderFactory.getLifecycleProviderFactory().getLifecycleProvider(facesContext.getExternalContext()); final Object bean = lifecycleProvider.newInstance(beanConfiguration.getManagedBeanClassName());
.getLifecycleProviderFactory( externalContext).getLifecycleProvider(externalContext);
LifecycleProviderFactory.getLifecycleProviderFactory(facesContext.getExternalContext()).getLifecycleProvider(facesContext.getExternalContext());
.getLifecycleProviderFactory( externalContext).getLifecycleProvider(externalContext);
@Override public void contextDestroyed(ServletContextEvent event) { if (_facesInitializer != null && _servletContext != null) { // Create startup FacesContext before start undeploy FacesContext facesContext = _facesInitializer.initShutdownFacesContext(_servletContext); dispatchInitializationEvent(event, FACES_INIT_PHASE_PREDESTROY); _facesInitializer.destroyFaces(_servletContext); LifecycleProviderFactory.getLifecycleProviderFactory().release(); // Destroy startup FacesContext, but note we do before publish postdestroy event on // plugins and before release factories. if (facesContext != null) { _facesInitializer.destroyShutdownFacesContext(facesContext); } FactoryFinder.releaseFactories(); //DiscoverSingleton.release(); //clears EnvironmentCache and prevents leaking classloader references dispatchInitializationEvent(event, FACES_INIT_PHASE_POSTDESTROY); } _servletContext = null; }
public void contextDestroyed(ServletContextEvent event) { if (_facesInitializer != null && _servletContext != null) { // Create startup FacesContext before start undeploy FacesContext facesContext = _facesInitializer.initShutdownFacesContext(_servletContext); dispatchInitializationEvent(event, FACES_INIT_PHASE_PREDESTROY); // call contextDestroyed on ManagedBeanDestroyerListener to destroy the attributes _detroyerListener.contextDestroyed(event); _facesInitializer.destroyFaces(_servletContext); LifecycleProviderFactory.getLifecycleProviderFactory().release(); // Destroy startup FacesContext, but note we do before publish postdestroy event on // plugins and before release factories. if (facesContext != null) { _facesInitializer.destroyShutdownFacesContext(facesContext); } FactoryFinder.releaseFactories(); //DiscoverSingleton.release(); //clears EnvironmentCache and prevents leaking classloader references dispatchInitializationEvent(event, FACES_INIT_PHASE_POSTDESTROY); } _servletContext = null; }
public void contextDestroyed(ServletContextEvent event) { if (_facesInitializer != null && _servletContext != null) { // Create startup FacesContext before start undeploy FacesContext facesContext = _facesInitializer.initShutdownFacesContext(_servletContext); dispatchInitializationEvent(event, FACES_INIT_PHASE_PREDESTROY); // call contextDestroyed on ManagedBeanDestroyerListener to destroy the attributes _detroyerListener.contextDestroyed(event); _facesInitializer.destroyFaces(_servletContext); LifecycleProviderFactory.getLifecycleProviderFactory().release(); // Destroy startup FacesContext, but note we do before publish postdestroy event on // plugins and before release factories. if (facesContext != null) { _facesInitializer.destroyShutdownFacesContext(facesContext); } FactoryFinder.releaseFactories(); //DiscoverSingleton.release(); //clears EnvironmentCache and prevents leaking classloader references dispatchInitializationEvent(event, FACES_INIT_PHASE_POSTDESTROY); } _servletContext = null; }