ejb@glassfish.java.net

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

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Sat, 25 Feb 2006 18:34:05 -0500 (EST)

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.

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