They must have at least 1 non-private ct (this includes the default ct). And if it does
have a parameter, then it must be annotated with @Inject.
This is perfectly enough to create a proxy. Of course this @Inject constructor must not
get called while creating the proxy itself (because this might contain certain checks and
logic). In this very case a default-ct must get added to the proxy-subclass via byte code
enhancement techniques.
Also please note that not the CDI specification defines any interceptor behaviour but the
Interceptors-1.1 specification (or any update which gets defined by the EJB-3.2 Expert
Group). So any assumption we made in CDI must be synced with their work.
And actually, all beans of passivating scopes must provide a default-ct because of
Serialization reasons anyway, isn't?
LieGrue,
strub
----- Original Message -----
From: Stuart Douglas <stuart.w.douglas(a)gmail.com>
To: Mark Struberg <struberg(a)yahoo.de>
Cc: Jozef Hartinger <jharting(a)redhat.com>; cdi-dev <cdi-dev(a)lists.jboss.org>
Sent: Thursday, October 20, 2011 6:54 AM
Subject: Re: [cdi-dev] Question for clarification and my understanding
I thought that interceptors had to be done via subclassing as well, as the spec
does not specify that intercepted beans have to have a default constructor?
Stuart
On 20/10/2011, at 3:44 PM, Mark Struberg wrote:
> The spec says that only Decorators need to be done via subclassing.
>
> LieGrue,
> strub
>
>
>
> ----- Original Message -----
>> From: Jozef Hartinger <jharting(a)redhat.com>
>> To: Rick Hightower <richardhightower(a)gmail.com>
>> Cc: cdi-dev <cdi-dev(a)lists.jboss.org>
>> Sent: Wednesday, October 19, 2011 7:33 PM
>> Subject: Re: [cdi-dev] Question for clarification and my understanding
>>
>> Only normal scoped beans require client proxies. Decoration and
>> interception should be implemented by subclassing (see CDI-74, CDI-44).
>>
>> On 10/19/2011 07:24 PM, Rick Hightower wrote:
>>>
>>> Section 5.4
>>>
>>> "Client proxies are never required for a bean whose scope is a
>>> pseudo-scope such as @Dependent."
>>>
>>>
>>> I understand the concept of client proxies to allow for scopes and
>>> context.
>>>
>>>
>>> Is this a true statement...
>>>
>>> Client proxies may not be needed for @Dependent (pseudo scope). CDI
>>> may provide a client proxy for @Dependent.
>>> A proxy is needed for @Dependent objects that are decorated or
>>> intercepted with Decorators or Interceptors.
>>>
>>> Are all injected objects proxied or only objects that are normal
>>> scoped or decorated?
>>>
>>>
>>>
>>> --
>>> *Rick Hightower*
>>> (415) 968-9037
>>> Profile <
http://www.google.com/profiles/RichardHightower>
>>>
>>>
>>>
>>> _______________________________________________
>>> cdi-dev mailing list
>>> cdi-dev(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>> _______________________________________________
>> cdi-dev mailing list
>> cdi-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/cdi-dev
>>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/cdi-dev