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

Entity Bean Instance

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

When we call remove() on an Entity bean instance, the entity (actual row in the database is deleted) but the bean instance survives. So this means that the beans state is reset to some initial values and sent back to the pool. Am I right in this sense?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the bean is not reinitialized. The state does not change after the removal.

Persistance specification, 3.2.2 Removal.
After an entity has been removed, its state (except for generated state) will be that of the entity at the
point at which the remove operation was called.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So that means if after calling remove(), if my value was joe for the firstName instance field in my entity bean, then joe remains when my entity bean instance is pooled? Is that right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic