5 Replies Latest reply on Aug 31, 2008 8:45 PM by R Morris

    EntityManager cannot persist

    Yuriy ZUbarev Newbie

      It's a pretty basic set-up. There are EntityHome and POJO classes. The first one raises an event and the second one consumes it. The entityManager in the POJO is good for finding entities but does absolutely nothing when I try to persist/update an entity (no log output whatsoever).

      public abstract class PartyHome<P extends Party> extends EntityHome<P> {
        private Events events;
        public String update() {
          String result = super.update();
          this.events.raiseAsynchronousEvent("party.changed", getInstance().getId());
          return result;

      public class PartyObserver {
        private Log log;
        EntityManager entityManager;
        public void handleChangedParty(long partyId) {
          Party party = this.entityManager.find(Party.class, partyId); // this works
          this.entityManager.persist(client); // this doesn't !!!

      Any hints?