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

Help Ejb 3 In Action page 304

 
Mamadou Touré
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,
I`m a little bit confused at page 304 of the EJB3 in action with the code below


The purpose of the code is to undo the changes made on the item, so why don't we just say entityManager.refresh(item), insted of passig again the entityManager.merge(item) as an argument to the refresh method ??

It's the same thing with the second method when it comes to deleting an item ( why domn't we just say entityManager.remove(item) instead of entityManager.remove(entityManager.merge(item)) ??
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this thread
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic