Hello all,
some entity was changed otherwise during it was editing in web. This entity is associated with an extended persistent context. After trying to persist the changes, it naturally (as expected) throws an exception. My idea is
Entity merged = em.merge(dirtyEntity) ; if(merged.isModifiable()) em.persist(merged);