0 Replies Latest reply on Sep 3, 2007 7:09 AM by fatbatman

    @PostPersist called before Transaction ends

    fatbatman Novice

      I have a @PostPersist EntityListener which I expected to be called after the transaction is finished and the data is in the database, however this doesn't seem to be the case. The EntityListener is called before the transaction ends when the data is not yet in the database, meaning a rollback can occur after the EntityListener has been called.
      Is this the expected behaviour of PostPersist? if so it's rather confusing and I don't see how in practice it's different from @PrePersist?

      These threads touch on the issue also, but neither recieved an answer.