You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Eric Covener <co...@gmail.com> on 2010/04/21 17:33:27 UTC
Fwd: [jira] Commented: (OWB-359) ownerCreationalContext sometimes
causes NPE in InterceptorDataImpl.createNewInstance()
Bounced first time using covener@a.o as sender in gmail....
---------- Forwarded message ----------
From: Eric Covener <co...@apache.org>
Date: Wed, Apr 21, 2010 at 11:31 AM
Subject: Fwd: [jira] Commented: (OWB-359) ownerCreationalContext
sometimes causes NPE in InterceptorDataImpl.createNewInstance()
To: dev@openwebbeans.apache.org
> Yes, but NormalScopedBeanInterceptorHandler always uses CreationalContext of the bean instance that was created
> In getContextualInstance # NormalScopedBeanInterceptorHandler
> ............
> if (webbeansContext instanceof AbstractContext)
> {
> CreationalContext<?> cc = ((AbstractContext)webbeansContext).getCreationalContext(bean);
> if (cc != null)
> {
> creationalContext = new WeakReference<CreationalContext<?>>(cc);
> }
> }
>
> It means that current thread looks for the right context of the bean instance to get right creational context.
> This creational context may be owned by different bean instances(different threads), and CreationalContextImpl was written to handle such a case,
> (saving dependents on using bean instance as a key) , so OWB351 not occurs.
When we get a new CreationalContext in this branch, who holds the
(strong) reference to it?
--
Eric Covener
covener@gmail.com
--
Eric Covener
covener@gmail.com