ejb@glassfish.java.net

Re: annotations in superclasses of a ejb3 bean that does not contain any annotation

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Mon, 27 Feb 2006 09:48:24 -0500

Cheng Fang wrote:

>Hi,
>
>If I have a ejb3 session bean that does not contain any annotation (no
>injection and no component defining annotation). Its superclass or
>superclasses do have some annotations (like resource injections, or
>lifecycle callback methods or aroundInvoke methods).
>
>My understanding is these annotations will be processed and invoked for
>this bean.
>
Yes, they should still be processed if the ejb-jar.xml refers to the
ejb-jar_3_0.xsd
and it does not container metadata-complete=true.

>
>Could anyone confirm this is a valid and portable behavior?
>
>Java EE 5 platform spec Table EE.5-1 lists 14 type of classes that support
>injection. I would think this type of annotation inheritance for these
>annotation-free component classes should also be processed and invoked.
>
>servlet
>servlet filters
>event listeners
>
>jsp tag handlers
>tag lib even listeners
>
>jsf scoped managed beans
>
>jax-rpc service endpoints
>jax-rpc handlers
>
>jax-ws endpoints
>jax-ws handlers
>
>ejb beans
>ejb interceptors
>
>appclient main
>appclient login callback handler
>
>Thanks.
>-- Cheng
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
>
>