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

Checked exception - NoSuchObjectException & ObjectNotFoundException

 
mini mehta
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
In HFE Page 553, It says that NoSuchObjectException & ObjectNotFoundException are checked expections. But I can't see any of the home or component interfaces of the EJBs declaring them. Can anybody please shed some light?
Regards
Mini
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider a method declaration such as this in a remote home interface.
public Customer findByPrimaryKey(String key) throws RemoteException, FinderException
NoSuchObjectException IS-A RemoteException and ObjectNotFoundException IS-A FinderException. The container may be encouraged to throw the more meaningful NoSuchObjectException and ObjectNotFoundException rather than their superclasses, but both are legal due to inheritance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic