• 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
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

a question regarding chap 9 ejb3 in action

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic