File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes a question regarding chap 9 ejb3 in action Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "a question regarding chap 9 ejb3 in action" Watch "a question regarding chap 9 ejb3 in action" New topic
Author

a question regarding chap 9 ejb3 in action

Ash More'
Ranch Hand

Joined: Apr 20, 2008
Posts: 47
i am bit puzzled about the chapter 9 listing 9.1



shouldnt the above code be like this:


in the code mentioned in the book , why is entityManager.merge(item) used as a parameter to methods refresh and remove??
if entityManager.merge(item) is used inside the refresh method , then merge will first update the database and then refresh will bring the newly updated value back , so will undoItemChanges work??

what does entityManager.merge(item) actually return?? the instance with old values or the instance of item with modified values??


any help would be really appreciated
[ May 03, 2008: Message edited by: Ash More' ]
Ash More'
Ranch Hand

Joined: Apr 20, 2008
Posts: 47
ok,
i was running too ahead of myself. the explanation has been given through the rest of the chapter. i got the answer to my queries.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: a question regarding chap 9 ejb3 in action
 
Similar Threads
Entitymanager.refresh doubt
JPA Refresh Query from EJB3 In Action
Help Ejb 3 In Action page 304
EJB3 in Action errata for EntityManager.refresh() method
EJB 3 IN ACTION - EntityManager merge() and refresh() method conflict