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
<[email protected]>:
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 <[email protected]>
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