[jboss-user] [JBoss Seam] - Overriding a method partially breaks annotations

MSchmidke do-not-reply at jboss.com
Wed Nov 14 04:11:41 EST 2007


I don't know if this is a bug or if I am making a mistake, but Seam behaves some kind of strange (2.0.0.CR1):

I have a base class


  | public abstract class AImpl implements A {
  |   @In protected org.hibernate.Session session;
  | 
  |   @Create
  |   @Begin
  |   public void create() {}
  | }
  | 

and a derived class


  | @Stateful
  | @Name("b")
  | public class BImpl extends AImpl implements B {
  | 
  |   @Override
  |   public void create() {
  |     super.create();
  |   }
  | }
  | 

This does not work as expected.

Interestingly, the @Begin annotation is broken by this construct, but the @Create isn't (and the @In in the base class also works fine). In other words, the create() method is called, but no Conversation is started.

Is there any documented way how to work with Seam annotations in a class Hierarchy?

To be on the safe side, as a first step I'll mark all annotated base class methods as final.


Marcus.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104421#4104421

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104421



More information about the jboss-user mailing list