openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r946812 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
Date Thu, 20 May 2010 22:18:29 GMT
Author: struberg
Date: Thu May 20 22:18:29 2010
New Revision: 946812

URL: http://svn.apache.org/viewvc?rev=946812&view=rev
Log:
OWB-382 we must not store the ThreadLocal but only the instance it serves

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java?rev=946812&r1=946811&r2=946812&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
Thu May 20 22:18:29 2010
@@ -189,12 +189,12 @@ public class ProducerMethodBean<T> exten
                 isInjectionToAnotherBean = contextual == this ? false : true;
             }
             
-            Object injectionTargetInstance = AbstractInjectable.instanceUnderInjection;
+            ThreadLocal<Object> injectionTargetInstance = AbstractInjectable.instanceUnderInjection;
             if(isInjectionToAnotherBean)
             {
                 if(oldDependents == null && injectionTargetInstance != null)
                 {
-                    ((CreationalContextImpl)creationalContext).addDependent(injectionTargetInstance,
this , instance);
+                    ((CreationalContextImpl)creationalContext).addDependent(injectionTargetInstance.get(),
this , instance);
                 }
                 else
                 {
@@ -230,7 +230,7 @@ public class ProducerMethodBean<T> exten
                         {
                             if(oldDependents == null && injectionTargetInstance !=
null)
                             {
-                                ((CreationalContextImpl)creationalContext).addDependent(injectionTargetInstance,
this , instance);
+                                ((CreationalContextImpl)creationalContext).addDependent(injectionTargetInstance.get(),
this , instance);
                             }
                             else
                             {



Mime
View raw message