• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoSuchObjectException or EntityNotFoundException  RSS feed

 
Peter Warde
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you call a method on an entity bean after having called remove() do you get a NoSuchObjectException or EntityNotFoundException ie is the bean in the "does not exist " state?

Thanks
 
Nileesha Bojjawar
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You get a NoSuchObjectException or NoSuchObjectLocalException are thrown if the object is removed( which could mean the entity bean object he has a reference to/or the entity the object is refereing to which means the clients reference is void now) and client is calling a method on it, where as the NoSuchEntityException is thrown by the bean to the container during one of the callbacks/methods where it could not complete the operation because the entity is removed from the database(underlying persistent store). Hope this helps.

Regards
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!