This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JPA Certification (OCEJPA) and the fly likes doubt about PostRemove and PostUpdate events Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » JPA Certification (OCEJPA)
Bookmark "doubt about PostRemove and PostUpdate events" Watch "doubt about PostRemove and PostUpdate events" New topic
Author

doubt about PostRemove and PostUpdate events

Paul.J Wong
Greenhorn

Joined: Apr 25, 2013
Posts: 7
Hi everyone,

I have a doubt about PostRemove and PostUpdate events. In the Pro JPA 2 book, on page 327, it states "When the SQL for deletion of an entity finally does get sent to the database, the PostRemove event will get fired. As with the PostPersist lifecycle event, the PostRemove event does not guarantee success. The enclosing transaction may still be rolled back".

As I learned, transaction can either commit, or rollback. In the sentence, if the deletion SQL does get sent to the database, that means the transaction is already committed, how come it may still be rolled back?

Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: doubt about PostRemove and PostUpdate events