[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - XPOST - @PostPersist called before Transaction ends
fatbatman
do-not-reply at jboss.com
Thu Sep 13 11:46:33 EDT 2007
Original post at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=117709
---------------------------------------------------------------------
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.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=74966
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=90397
regards
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084023#4084023
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084023
More information about the jboss-user
mailing list