• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

NoSuchObjectException or EntityNotFoundException

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic