0 Replies Latest reply on Apr 4, 2007 2:25 PM by mr662

    MDB abstract base class and EJB3 annotations

    mr662 Newbie

      I have following scenario where my MDB class extends an abstract class which implements the MessageListener interface.

      public abstract class MDBBase implements MessageListener {
       public void onMessage(Message message) {
       ....
       processJob(some-params)
       }
       public abstract void processJob (some-params);
      }
      
      public class MyMDB extends MDBBase {
       public abstract void processJob (some-params) {
      
       }
      }


      I use following EJB3 annotations in MyMDB class
      @TransactionManagement(TransactionManagementType.BEAN)
      @SecurityDomain("myapp")
      @RunAs ("Internal")


      The question is does the abstract base class also need these annotations?

      What I am see'ing is that without @RunAs ("Internal") on the abstract base class, jboss gives insufficient permissions exception because the message queue requires role "Internal". Is this a bug or working as designed? I was expecting that I wouldn't have to annotate the abstract base class.

      What about the other annotations @SecurityDomain and @TransactionManagement?