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 2010/05/21 00:18:29 UTC
svn commit: r946812 -
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/ProducerMethodBean.java
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
{