openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r1001801 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: container/BeanManagerImpl.java lifecycle/AbstractLifeCycle.java
Date Mon, 27 Sep 2010 16:16:28 GMT
Author: gerdogdu
Date: Mon Sep 27 16:16:28 2010
New Revision: 1001801

URL: http://svn.apache.org/viewvc?rev=1001801&view=rev
Log:
Cleaning of maps in BeanManager to help GC

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

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java?rev=1001801&r1=1001800&r2=1001801&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/BeanManagerImpl.java
Mon Sep 27 16:16:28 2010
@@ -76,7 +76,6 @@ import org.apache.webbeans.exception.inj
 import org.apache.webbeans.intercept.InterceptorComparator;
 import org.apache.webbeans.intercept.WebBeansInterceptorConfig;
 import org.apache.webbeans.intercept.webbeans.WebBeansInterceptor;
-import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.plugins.OpenWebBeansJmsPlugin;
 import org.apache.webbeans.plugins.PluginLoader;
 import org.apache.webbeans.portable.AnnotatedElementFactory;
@@ -170,7 +169,7 @@ public class BeanManagerImpl implements 
 
     private AnnotatedElementFactory annotatedElementFactory;
 
-    private WebBeansLogger logger = WebBeansLogger.getLogger(BeanManagerImpl.class);
+    //private WebBeansLogger logger = WebBeansLogger.getLogger(BeanManagerImpl.class);
 
     /**
      * Creates a new {@link BeanManager} instance.
@@ -1095,4 +1094,22 @@ public class BeanManagerImpl implements 
     {
         return additionalScopes;
     }
+    
+    public void clear()
+    {
+        this.additionalAnnotatedTypes.clear();
+        this.additionalDecoratorClasses.clear();
+        this.additionalInterceptorClasses.clear();
+        this.additionalQualifiers.clear();
+        this.additionalScopes.clear();
+        this.cacheProxies.clear();
+        this.contextMap.clear();
+        this.deploymentBeans.clear();
+        this.errorStack.clear();
+        this.injectionTargetForJavaEeComponents.clear();
+        this.injectionTargetWrappers.clear();
+        this.passivationBeans.clear();
+        this.webBeansDecorators.clear();
+        this.webBeansInterceptors.clear();
+    }
 }

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=1001801&r1=1001800&r2=1001801&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
Mon Sep 27 16:16:28 2010
@@ -167,8 +167,11 @@ public abstract class AbstractLifeCycle 
             
             //After Stop
             afterStopApplication(endObject);
-            
-            //Clear singleton list
+
+            // Clear BeanManager
+            this.beanManager.clear();
+
+            // Clear singleton list
             WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader());
                         
         }



Mime
View raw message