You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2010/09/16 02:34:26 UTC

svn commit: r997552 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java

Author: lu4242
Date: Thu Sep 16 00:34:26 2010
New Revision: 997552

URL: http://svn.apache.org/viewvc?rev=997552&view=rev
Log:
MYFACES-2919 LifecycleProvider Based Problems and Tomcat7 LifeCycleProvider Support

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=997552&r1=997551&r2=997552&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Thu Sep 16 00:34:26 2010
@@ -434,11 +434,18 @@ public class FacesConfigurator
                     log.severe("Error during configuration clean-up" + e.getMessage());
                 }
                 configure();
-                
+                                
                 // JSF 2.0 Publish PostConstructApplicationEvent after all configuration resources
                 // has been parsed and processed
                 FacesContext facesContext = FacesContext.getCurrentInstance();
-                Application application = facesContext.getApplication(); 
+                Application application = facesContext.getApplication();
+                
+                // TODO: This is a workaround, to make this feature work. In theory, the method update should be called
+                // in a way that StartupServletContextListener could "get involved".
+                ManagedBeanDestroyer mbDestroyer = new ManagedBeanDestroyer();
+                application.subscribeToEvent(PreDestroyCustomScopeEvent.class, mbDestroyer);
+                application.subscribeToEvent(PreDestroyViewMapEvent.class, mbDestroyer);
+                
                 application.publishEvent(facesContext, PostConstructApplicationEvent.class, Application.class, application);
             }
         }