4 Replies Latest reply on Nov 4, 2011 5:13 PM by newbee07

    Multi war entity management

    newbee07 Newbie

      Need help asap.

      We have a EAR with two wars and a ejb jar. We use JPA with HIbernate as our delegate and we use SMPC.

      So When the user1 in war1 and user2 in war2 loads a same entity e-1 using their respective conversation scoped entity manangers em1 and em2 and when user1 edits and flushes the changes to the entity e-1, the entity mananger em2 is not getting dirty. We check the dirtyness like below,

      Session session = (Session) em.getDelegate();
      boolean isDirty = session.isDirty();

      As both the wars are combined in the same ear, changes done by one war need to be propagated to other war isn't it. Or Am I missing anything here.