• 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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!