4 Replies Latest reply on Apr 7, 2010 5:05 PM by Gabor Jakab

    Problem viewing the updated details in another session bean

    shanika Dias Newbie

      Hi,


      I have two session scoped stateful sessionbeans. One has methods to add, update and delete records. The other session bean has the methd to query and get the list of availble records.


      My issue is that when I update a record and before the update method ends when I query for the list of records, and write to a log file, it shows the list with the updated changes.  But if I query in the other session bean still it shows the old data. It only shows the updated data only if execute it in a different browser.


      update()
      {
        ....
        em.flush();


        // query to get resultset
        // log results
      }


      Any idea why this happens? Why does the DB updates done through one session bean does not reflect in another session bean?


      -Shanika