This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests and have Scott Selikoff and Jeanne Boyarsky on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Question on Whether a Message Driven Bean can have Message Driven Bean as Superclass

 
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Source: EJB 3.1 Specification



5.6 The Responsibilities of the Bean Provider

5.6.2 Message-Driven Bean Class

The message-driven bean class may have superclasses and/or superinterfaces. If the message-driven bean has superclasses, the methods of the messagelistener interface, lifecycle callback interceptor methods, timeout callback methods, the ejbCreatemethod, and the methods of the Mes-sageDrivenBeaninterface may be defined in the message-driven bean class or in any of its super-classes.
A message-driven bean class must not have a superclass that is itself a message-driven bean class



5.6.3 Message-Driven Bean Superclasses

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



The above 2 statements seems to be contradictory.

Please advise how these 2 statements(italicized) are possible.
 
Creator of Enthuware JWS+ V6
Posts: 3376
307
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In 5.6.2. it is specified that certain methods can be defined on a superclass. Like the onMessage() method is allowed to be on a superclass as long as the superclass is not a Message Driven Bean. In that case the onMessage() method won't be inherited.

In 5.6.3. it is specified that a Message Driven Bean can have a MDB as superclass which is merely a convenient use of implementation inheritence.

Regards,
Frits
 
Mohit G Gupta
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Frits
 
I am a man of mystery. Mostly because of this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic