You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2013/02/09 20:03:56 UTC

svn commit: r1444409 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java

Author: struberg
Date: Sat Feb  9 19:03:56 2013
New Revision: 1444409

URL: http://svn.apache.org/r1444409
Log:
OWB-755 always properly clean singleton map on shutdown

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java?rev=1444409&r1=1444408&r2=1444409&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/lifecycle/AbstractLifeCycle.java Sat Feb  9 19:03:56 2013
@@ -54,7 +54,6 @@ public abstract class AbstractLifeCycle 
     private final BeansDeployer deployer;
 
     /**XML discovery. */
-    //XML discovery is removed from the specification. It is here for next revisions of spec.
     private final WebBeansXMLConfigurator xmlDeployer;
     
     /**Using for lookup operations*/
@@ -176,10 +175,6 @@ public abstract class AbstractLifeCycle 
 
             // Clear BeanManager
             beanManager.clear();
-
-            // Clear singleton list
-            WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader());
-                        
         }
         catch (Exception e)
         {
@@ -188,7 +183,11 @@ public abstract class AbstractLifeCycle 
                 logger.log(Level.SEVERE, OWBLogConst.ERROR_0021, e);
             }
         }
-        
+        finally
+        {
+            // Clear singleton list
+            WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader());
+        }
     }
 
     /**