• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to Update the entity in ejb3.0

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using ejb3.0,I have one entity bean .Suppose ,if i open 2 browsers parallely and in one browser i am trying to do update my record by using edit functionality using entityManager.merge(),the value getting updated in the entity.Now if i am trying to view the same record in another browser which is already opened the entity is showing the old value instead of the new value.ofcourse i have done this even by refreshing the page .

please suggest me
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by V.N.T.Deepak Solasa:
I am using ejb3.0,I have one entity bean .Suppose ,if i open 2 browsers parallely and in one browser i am trying to do update my record by using edit functionality using entityManager.merge(),the value getting updated in the entity.Now if i am trying to view the same record in another browser which is already opened the entity is showing the old value instead of the new value.ofcourse i have done this even by refreshing the page .

please suggest me



It can be somewhere on the lines of, the update not committed yet, or the retrieval is getting it from a cache or buffer. If you close the 2nd browser and reopen it instead of just refreshing it, does the new data come out?
 
V.N.T.Deepak Solasa
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Angeles ,

Thanks for your response.yes,if i am closing the browser and open it again it is showing the updated records.
 
Jesus Angeles
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by V.N.T.Deepak Solasa:
ofcourse i have done this even by refreshing the page .



When you say 'refreshing', I assume you mean going back to the server and reading again from the table/ejb right? Or just pressing 'refresh' button of browser? If it is the latter, then it is not an ejb issue, it is your html.
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic