openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r809218 - in /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: config/WebBeansContainerDeployer.java portable/events/ExtensionLoader.java
Date Sat, 29 Aug 2009 22:49:25 GMT
Author: gerdogdu
Date: Sat Aug 29 22:49:24 2009
New Revision: 809218

URL: http://svn.apache.org/viewvc?rev=809218&view=rev
Log:
Update event firing in WebBeansContainerDeployer and correct collection problem in ExtensionLoader.

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ExtensionLoader.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java?rev=809218&r1=809217&r2=809218&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/WebBeansContainerDeployer.java
Sat Aug 29 22:49:24 2009
@@ -63,6 +63,7 @@
 import org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl;
 import org.apache.webbeans.portable.events.discovery.AfterDeploymentValidationImpl;
 import org.apache.webbeans.portable.events.discovery.BeforeBeanDiscoveryImpl;
+import org.apache.webbeans.portable.events.generics.GProcessManagedBean;
 import org.apache.webbeans.spi.JNDIService;
 import org.apache.webbeans.spi.ServiceLoader;
 import org.apache.webbeans.spi.deployer.MetaDataDiscoveryService;
@@ -690,7 +691,7 @@
             }
 
             //Fires ProcessManagedBean
-            ProcessBeanImpl<T> processBeanEvent = new ProcessManagedBeanImpl<T>(managedBean,annotatedType);
           
+            ProcessBeanImpl<T> processBeanEvent = new GProcessManagedBean(managedBean,annotatedType);
           
             BeanManagerImpl.getManager().fireEvent(processBeanEvent, new Annotation[0]);
             
             //Fires ProcessProducerMethod

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ExtensionLoader.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ExtensionLoader.java?rev=809218&r1=809217&r2=809218&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ExtensionLoader.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/events/ExtensionLoader.java
Sat Aug 29 22:49:24 2009
@@ -13,11 +13,10 @@
  */
 package org.apache.webbeans.portable.events;
 
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.ServiceLoader;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.enterprise.inject.spi.Bean;
 import javax.enterprise.inject.spi.Extension;
@@ -38,7 +37,7 @@
 public class ExtensionLoader
 {
     /**Map of extensions*/
-    private Map<Bean<?>, Object> extensions = Collections.emptyMap();
+    private Map<Bean<?>, Object> extensions = new ConcurrentHashMap<Bean<?>,
Object>();
     
     /**
      * Creates a new loader instance.
@@ -67,7 +66,6 @@
     {
         ServiceLoader<Extension> loader = ServiceLoader.load(Extension.class, WebBeansUtil.getCurrentClassLoader());
         Iterator<Extension> iterator = loader.iterator();
-        Map<Bean<?>, Object> map = new HashMap<Bean<?>, Object>();
         
         while(iterator.hasNext())
         {
@@ -75,7 +73,7 @@
             try
             {
                 Bean<?> bean = WebBeansUtil.createExtensionComponent(ext.getClass());
               
-                map.put(bean, ext);
+                this.extensions.put(bean, ext);
                 
                 BeanManagerImpl.getManager().addBean(bean);
             }
@@ -83,9 +81,7 @@
             {
                 throw new WebBeansException("Error is occured while reading Extension service
list",e);
             }
-        }
-        
-        this.extensions = Collections.unmodifiableMap(map);
+        }        
     }
     
     /**



Mime
View raw message