openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r901332 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
Date Wed, 20 Jan 2010 19:03:08 GMT
Author: gerdogdu
Date: Wed Jan 20 19:03:07 2010
New Revision: 901332

URL: http://svn.apache.org/viewvc?rev=901332&view=rev
Log:
[OWB-241] Conversation scoped bean instance gets destroyed for every ELResolver.getValue

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java?rev=901332&r1=901331&r2=901332&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/el/ELContextStore.java
Wed Jan 20 19:03:07 2010
@@ -23,6 +23,7 @@
 import java.util.Set;
 
 import javax.el.ELContext;
+import javax.enterprise.context.Dependent;
 import javax.enterprise.context.spi.CreationalContext;
 import javax.enterprise.inject.spi.Bean;
 
@@ -70,7 +71,10 @@
 
     public void addDependent(Bean<?> bean, Object dependent, CreationalContext<?>
creationalContext)
     {
-        this.dependentObjects.put(bean, new CreationalStore(dependent,creationalContext));
+        if(bean.getScope().equals(Dependent.class))
+        {
+            this.dependentObjects.put(bean, new CreationalStore(dependent,creationalContext));
  
+        }
     }
     
     public Object getDependent(Bean<?> bean)
@@ -96,7 +100,7 @@
         {
             Bean<Object> o = (Bean<Object>)bean;
             CreationalStore store = this.dependentObjects.get(bean);
-            o.destroy(o, (CreationalContext<Object>)store.getCreational());
+            o.destroy(store.getObject(), (CreationalContext<Object>)store.getCreational());
         }
         
         this.dependentObjects.clear();



Mime
View raw message