2 Replies Latest reply on Mar 19, 2008 12:13 PM by Pete Muir

    javax @PersistenceContext question?

    Vikram Chhetry Newbie

      Hi All,
      I have a page where I manage user info like add,search,edit,update. All these things are done in that single page using ajax4js modalPanel.


      I have 2 session beans:-


      1.) Manage.java


      2.) AddEdit.java


      Pagination using ajax4js was not possible so I put my Manage.java session bean on conversation context with @Begin and @End methods (I am not sure if it was a right move). All the things started working properly.


      Now I am forced to use @PersistenceContext EntityManager while  getting single user info and updating it(find,merge) in place of @In EntityManager due to some reason.


      I have read somewhere that javax @PersistenceContext is non-threadsafe.


      Ques 1.) Does non-threadsafe means, when multiple users will be using the application the @PersistenceContext will not be syncronized?


      Ques 2.) In my use case will it work fine(as I am using it for find and update only)?


      Any help would be appreciated.


      -Vikram