aspose file tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Help Ejb 3 In Action page 304 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Help Ejb 3 In Action page 304" Watch "Help Ejb 3 In Action page 304" New topic
Author

Help Ejb 3 In Action page 304

Mamadou Touré
Ranch Hand

Joined: Dec 27, 2007
Posts: 189
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)) ??

SCJP 5 (76%)
SCWCD 5 (86%)
SCBCD 5(70%)
--------------------
"The greatest glory in living lies not in never falling, but in raising every time we fall.".. Nelson Mandela
Deepika Joshi
Ranch Hand

Joined: Feb 24, 2009
Posts: 268
try this thread
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Help Ejb 3 In Action page 304
 
Similar Threads
Entitymanager.refresh doubt
JPA Refresh Query from EJB3 In Action
a question regarding chap 9 ejb3 in action
EJB3 in Action errata for EntityManager.refresh() method
EJB 3 IN ACTION - EntityManager merge() and refresh() method conflict