[weld-dev] Question regarding behavior of Decorated dependent scoped beans

Pete Muir pmuir at redhat.com
Mon Feb 15 12:07:14 EST 2010


https://jira.jboss.org/jira/browse/WELD-437

On 5 Feb 2010, at 22:12, Gurkan Erdogdu wrote:

> I have tried this in JBoss 6.0.0 M1 and it proxies interceptors/decorators even on dependent beans.
> 
> --Gurkan
> 
> From: Gavin King <gavin.king at gmail.com>
> To: Pete Muir <pmuir at redhat.com>
> Cc: weld-dev at lists.jboss.org; Joseph Bergmark <bergmark at apache.org>
> Sent: Fri, February 5, 2010 9:09:28 PM
> Subject: Re: [weld-dev] Question regarding behavior of Decorated dependent scoped beans
> 
> On Fri, Feb 5, 2010 at 12:39 PM, Pete Muir <pmuir at redhat.com> wrote:
> > Sorry, we lost this email.
> >
> > On 18 Jan 2010, at 23:07, Joseph Bergmark wrote:
> >
> >> While verifying the behavior of decorated dependent scoped beans on OpenWebBeans, Gurkan mentioned that he observed the same behavior on WELD.  While verifying myself I noticed two behaviors that seem to conflict with the spec.
> >>
> >> 1) Non-normal scoped beans don't have any restrictions on public fields.  A quick test showed that changes made to public fields directly are not reflected when a call to a getter method that returns that value of the public field is made.  Presumably this is because there is an proxy like object in the middle.
> >>
> >> For example
> >>
> >> @Inject MyBean myBean;
> >>
> >> myBean.number = 7;
> >> myBean.getNumber(); //would return the default value for number and not 7 which it was just set to.
> >
> > Correct, I don't think the spec covers this.
> 
> Interceptors and decorators are supposed to be implemented by
> subclassing, not by proxying.
> 
> -- 
> Gavin King
> gavin.king at gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
> 
> _______________________________________________
> weld-dev mailing list
> weld-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/weld-dev
> 
> Yahoo! Türkiye açıldı!
> Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
> www.yahoo.com.tr




More information about the weld-dev mailing list