Search code examples
jakarta-eespecificationsejb-3.1message-driven-bean

Unclear EJB 3.1 spec: Message Driven Bean superclasses allowed or not?


The EJB 3.1 spec is unclear to me in whether Message Driven Bean superclasses are allowed. Can anyone shed any light on this?

Section 5.6.2, page 151 says:

A message-driven bean class must not have a superclass that is itself a message-driven bean class

But Section 5.6.3, page 151, just below, says:

A message-driven bean class is permitted to have superclasses that are themselves message-driven bean classes.


Solution

  • Section 5.6.3 was added to EJB 3.1 to allow MDB superclasses to themselves be MDBs (section A.3 records the change history to chapter 5), but the sentence from section 5.6.2 was simply not removed. As NayanWadekar mentioned in the comments, there were many editorial cleanups in EJB 3.2, and the sentence disallowing MDB superclasses to themselves be MDBs was removed.