[cdi-dev] clarification about interceptors in ejb-jar.xml

Martin Kouba mkouba at redhat.com
Fri Jan 4 05:32:11 EST 2013


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 at yahoo.de>
> To: 	cdi-dev <cdi-dev at 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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> 
> 
> 
> 
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> 


More information about the cdi-dev mailing list