[jboss-user] [EJB 3.0] - MDB abstract base class and EJB3 annotations

ajay662 do-not-reply at jboss.com
Wed Apr 4 14:25:09 EDT 2007

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
  | @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? 

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

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

More information about the jboss-user mailing list