• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is RemoteDataImpl a real remote object?

 
Frank Liu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it need to generate RMI stub?If need ,then every public method in it should throw RemoteException.RemoteDataImpl has the same interface (DataInterface) as Data.The method in Data no need to throw RemoteException.Then how can I define DataInterface?
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RemoteDataImpl methods don't need to throw RemoteException, and neither do Data methods. It is perfectly legal for an interface implementation to throw fewer or narrower exceptions than the interface says. In general, it is perfectly legal for a subtype to narrow a type's throws clause.
- Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic