-
1. Re: Session bean inheritance
bfo81 Jul 26, 2006 4:31 AM (in response to gus888)I think so. Have a look at the "avoiding DRY" thread ;).
-
2. Re: Session bean inheritance
gus888 Jul 26, 2006 9:36 PM (in response to gus888)Thank you VERY MUCH, bfo81. The "avoiding DRY" is great topic.
-
3. Re: Session bean inheritance
bfo81 Jul 27, 2006 5:10 AM (in response to gus888)Yes, it is :). Just one more thing:
There are annotations that can be used in abstract superclasses (like @PersistenceContext, @In, @Out, @Logger, @Begin, @End, @Remove, @Destroy...) and there are some that must be applied to the concrete subclasses (@Stateful, @Stateless, @Name (of course *g*), @Conversational, @Scope, ...).
I'm not 100% sure, but I think that you can annotate the methods and properties of a superclass but not the class itself. But as I said, I'm not absolutely sure about that. Maybe someone with a deeper insight into the things going on can tell as a simple rule regarding this ;). -
4. Re: Session bean inheritance
gavin.king Jul 27, 2006 7:52 AM (in response to gus888)Any annotation on a superclass _member_ should be inherited to the subclass. Annotations on the superclass _type_ are not, in general.
-
5. Re: Session bean inheritance
gus888 Jul 27, 2006 10:03 AM (in response to gus888)BFO81, thank you so much for the excellent detailed explanation.
Gavin, thank you so much for your OFFICIAL confirmation.