Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Enterprise Bean class implements Object interface???

 
Denis Wang
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it allowed? If forbidden, why??
 
Denis Wang
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it forbidden only because of the exceptions decleared in the Remote interface?
Each method of a remote interface, an interface that extends java.rmi.Remote, must list RemoteException in its throws clause. This is required by RMI-IIOP. However, in a Bean Class RemoteException does not have to be declared as thrown because EJBException might be used instead.
Another related question, does EJBException, a runtime exception, have to be declared in the interface as thrown?
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From JDK API Documentation

Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.

I am uncertain about the context in which you have raised this question, but the answer is, everything in java is a subclass of Object.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic