You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by Gurkan Erdogdu <cg...@gmail.com> on 2009/10/26 21:31:39 UTC
Re: Question regarding Dependent scoped beans and
Interceptors/Decorators
Hi Joe;
Yeap this is the current situation at OWB. I have not found any valuable
information about this topic from the specification too. But spec. says that
@Dependent scoped beans are not proxied. From this statement, I though that
I not intercept/decorate dependent beans. Maybe this is not correct!
Mark, could you ask about it to Pete Muir :)?
Thanks;
--Gurkan
2009/10/26 Joseph Bergmark <be...@gmail.com>
> Does the 299 specification indicate that interceptors and decorators should
> not be called for dependent scoped beans? That appears to be the current
> behavior in OWB but I'm having trouble nailing it down in the spec.
>
> For example, 8.1.2 says:
> "The decorator applies to any bean that is eligible for injection to the
> delegate injection point, according to the rules defined in Section 5.3,
> “Typesafe resolution”. "
>
> 7.2 appears to apply some additional rules around what is a business method
> invocation, and that interceptors and decorators are only called for
> business method invocations. One restriction here is that the call must be
> to a contextual reference to a bean. 6.5.3 does talk about contextual
> instances of dependent scoped beans though.
>
> Section 5.5 talks about client proxies and that pseudo scopes (such as
> dependent) don't require a proxy. However, this doesn't appear to get tied
> back into Decorators and Interceptors anywhere that I have been able to
> find.
>
> Sincerely,
>
> Joe Bergmark
>
--
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com
Re: Question regarding Dependent scoped beans and
Interceptors/Decorators
Posted by Eric Covener <co...@gmail.com>.
On Mon, Oct 26, 2009 at 4:31 PM, Gurkan Erdogdu
<cg...@gmail.com> wrote:
> Hi Joe;
>
> Yeap this is the current situation at OWB. I have not found any valuable
> information about this topic from the specification too. But spec. says that
> @Dependent scoped beans are not proxied. From this statement, I though that
> I not intercept/decorate dependent beans. Maybe this is not correct!
>
> Mark, could you ask about it to Pete Muir :)?
FWIW, my take on the proxy issue was that while normal scope
contextual instances MUST be a proxy, pseudo-scope beans are _not
necessarily_ a proxy.
IOW which of these is intended in 299:
[ ] contextual instance of normal scope MUST be a client proxy,
contextual instance of pseudo-scope MAY be a proxy
[ ] contextual instance of normal scope MUST be a client proxy,
contextual instance of pseudo-scope MUST NOT be a proxy
(might be worth kicking up to Pete at the same time)
--
Eric Covener
covener@gmail.com
Re: Question regarding Dependent scoped beans and Interceptors/Decorators
Posted by Sven Linstaedt <sv...@googlemail.com>.
Afaik dependent scoped beans should inheret the lifecycle of these
beans they are injected into. Since they only live within the
"context" of a single other bean they do not need to proxied, which
does not mean from my point of view they must not get a full
interceptor/decorator stack.
Does anyone has a good use case/example when dependent scoped beans
are useful or necessary?
br, Sven
Am 26.10.2009 um 21:31 schrieb Gurkan Erdogdu
<cg...@gmail.com>:
> Hi Joe;
>
> Yeap this is the current situation at OWB. I have not found any
> valuable
> information about this topic from the specification too. But spec.
> says that
> @Dependent scoped beans are not proxied. From this statement, I
> though that
> I not intercept/decorate dependent beans. Maybe this is not correct!
>
> Mark, could you ask about it to Pete Muir :)?
>
> Thanks;
>
> --Gurkan
>
> 2009/10/26 Joseph Bergmark <be...@gmail.com>
>
>> Does the 299 specification indicate that interceptors and
>> decorators should
>> not be called for dependent scoped beans? That appears to be the
>> current
>> behavior in OWB but I'm having trouble nailing it down in the spec.
>>
>> For example, 8.1.2 says:
>> "The decorator applies to any bean that is eligible for injection
>> to the
>> delegate injection point, according to the rules defined in Section
>> 5.3,
>> “Typesafe resolution”. "
>>
>> 7.2 appears to apply some additional rules around what is a
>> business method
>> invocation, and that interceptors and decorators are only called for
>> business method invocations. One restriction here is that the call
>> must be
>> to a contextual reference to a bean. 6.5.3 does talk about
>> contextual
>> instances of dependent scoped beans though.
>>
>> Section 5.5 talks about client proxies and that pseudo scopes (such
>> as
>> dependent) don't require a proxy. However, this doesn't appear to
>> get tied
>> back into Decorators and Interceptors anywhere that I have been
>> able to
>> find.
>>
>> Sincerely,
>>
>> Joe Bergmark
>>
>
>
>
> --
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com