EJB manages tx and security too
well the idea would be to migrate ejb services to cdi slowly
(@Transactional for instance) so i'd say keep what exists today as
this (that's not a real issue) then try to make it more comfortable
wdyt?
Romain Manni-Bucau
Twitter: @rmannibucau
Blog:
yes, makes sense. But that means that effectively the same
interceptors annotations applied to CDI and EJBs can effectively result in different
scenarios.
There is also a difference between EJB and CDI within the business method resolution as
pointed out by Joe already (EJBs treats inheritance information from non EJBs different
than CDI does). Not sure how to fix it but we should either cleanly describe those
differences OR have a TCK for them OR define those scenarios non-portable.
LieGrue,
strub
----- Original Message -----
> From: Martin Kouba <mkouba(a)redhat.com>
> To: cdi-dev(a)lists.jboss.org
> Cc:
> Sent: Friday, January 4, 2013 11:32 AM
> Subject: Re: [cdi-dev] clarification about interceptors in ejb-jar.xml
>
> I think that answer NO makes sense. But it's not entirely clear - I mean
> the relation between EJB and CDI interceptors (at least for me :-).
>
> Nevertheless the EJB 3.1 spec states (12.7 Specification of Interceptors
> in the
> Deployment Descriptor) that the deployment descriptor can be used to
> specify interceptors and their binding to _enterprise beans_ and
> references the Interceptors spec for a definition of the deployment
> descriptor elements. Which indicates that EJB descriptor cannot be used
> for CDI managed beans IMHO.
>
> Martin
>
> Dne 3.1.2013 19:55, Joseph Bergmark napsal(a):
>> Talked with Mark about this briefly, and I think the answer is no. I
>> believe you can only apply interceptors to ejbs in the ejb-jar.xml.
>> There doesn't appear to be a way to apply it to an arbitrary class
> that
>> might be managed by CDI.
>>
>> Sincerely,
>>
>> Joe Bergmark
>>
>>
>> From: Mark Struberg <struberg(a)yahoo.de>
>> To: cdi-dev <cdi-dev(a)lists.jboss.org>,
>> Date: 01/03/2013 01:36 PM
>> Subject: [cdi-dev] clarification about interceptors in ejb-jar.xml
>> Sent by: cdi-dev-bounces(a)lists.jboss.org
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>>
>>
>>
>> The cdi spec defines that
>>
>>
>> "Interceptors declared using @Interceptors or in ejb-jar.xml are
> called
>> before interceptors declared using interceptor
>> bindings"
>>
>>
>> does that mean that we need to apply interceptors defined in ejb-jar.xml
>> to pure CDI beans as well?
>>
>> LieGrue,
>> strub
>>
>> _______________________________________________
>> 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
>
_______________________________________________
cdi-dev mailing list
cdi-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/cdi-dev