You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Shyam A <ja...@gmail.com> on 2009/08/28 22:14:59 UTC

Lifecycle callback clarification

Hello everyone,
I am a new user to this group. I recently started using OpenJPA . I need
some clarification on the callback events. Should the callback
events(postpersist and postupdate) get fired when the transaction has been
rolled back? The spec says that if there is an exception in the callback
method, the transaction has to be rolled back. I was thinking that the
post-events will not be fired if the transaction is rolled back. But I
tested the code and found the postupdate event was fired when the entity was
updated even when the transaction was rolled back.
I am not sure what the behavior should be and I would like to know the
correct behavior. I need to send a JMS message when the callback event
happens only the commit is successful. It will be great if anyone can
explain me the behavior.

Thanks in advance,
Shyam