Hi Gurkan!
The problem is this:
//Scope is normal
if (WebBeansUtil.isScopeTypeNormal(bean.getScope()))
{
instance = context.get(bean);
if(instance != null)
{
return instance;
}
and only after that, the proxy will get evaluated.
So, since AbstractContext#getInstance puts the bean into the map of the
context, this instance will get found and no proxy will get injected for every
subsequent bean discovery!
LieGrue,
strub
--- Gurkan Erdogdu <[email protected]> schrieb am Mo, 21.12.2009:
> Von: Gurkan Erdogdu <[email protected]>
> Betreff: Re: Proxy only gets resolved for the first instance injection
> An: [email protected]
> Datum: Montag, 21. Dezember 2009, 17:40
> Hi;
>
> Bean instance is injected by the container using
> getReference#BeanManagerImpl that uses proxy every time!
> (creates new one or use existing one with normal scoped
> beans)
>
> If you use Context interface directly, you must not use
> Context interface directly to get instance that is specified
> in the specification explicitly.
>
> This is just a quick try, but I will look at your test
> class after you check in.
>
> Thanks ;
>
> --Gurkan
>
>
>
>
> ________________________________
> From: Mark Struberg <[email protected]>
> To: [email protected]
> Sent: Mon, December 21, 2009 6:14:51 PM
> Subject: Proxy only gets resolved for the first instance
> injection
>
> Hi!
>
> I've created OWB-206 and checked in a unit test which
> demonstrates the blocker!
>
> I know that the build is currently broken therefore, but
> it's really important that we fix this issue asap!
>
> LieGrue,
> strub
>
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen
> herausragenden Schutz gegen Massenmails.
> http://mail.yahoo.com
>
>
>
>
> ___________________________________________________________________
> Yahoo! Türkiye açıldı! http://yahoo.com.tr
> İnternet üzerindeki en iyi içeriği Yahoo! Türkiye
> sizlere sunuyor!
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen
Massenmails.
http://mail.yahoo.com