myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1073190 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/ManagedBeanDestroyerListener.java
Date Mon, 21 Feb 2011 23:47:23 GMT
Author: lu4242
Date: Mon Feb 21 23:47:22 2011
New Revision: 1073190

URL: http://svn.apache.org/viewvc?rev=1073190&view=rev
Log:
MYFACES-3040 @PreDestroy Has Called 2 times

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/ManagedBeanDestroyerListener.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/ManagedBeanDestroyerListener.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/ManagedBeanDestroyerListener.java?rev=1073190&r1=1073189&r2=1073190&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/ManagedBeanDestroyerListener.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/webapp/ManagedBeanDestroyerListener.java
Mon Feb 21 23:47:22 2011
@@ -112,6 +112,12 @@ public class ManagedBeanDestroyerListene
     @SuppressWarnings("unchecked")
     public void sessionDestroyed(HttpSessionEvent event)
     {
+        // MYFACES-3040 @PreDestroy Has Called 2 times
+        // attributeRemoved receives the event too, so it does not 
+        // have sense to handle it here. Unfortunately, it is not possible to 
+        // handle it first and then on attributeRemoved, so the best bet is
+        // let the code in just one place.
+        /*
         if (_destroyer != null)
         {
             HttpSession session = event.getSession();
@@ -128,7 +134,7 @@ public class ManagedBeanDestroyerListene
                 Object value = session.getAttribute(name);
                 _destroyer.destroy(name, value);
             }
-        }
+        }*/
     }
     
     /* Context related methods ***********************************************/



Mime
View raw message