Hi all, I have this question regarding rolling back and I thought it is handled by Transaction Manager of the EJB 3.0 but it doesnot seem so. The problem is I have method in a Stateless session bean that trying to remove some rows in 1 table first and and then insert some rows in the other table. I want to make sure if the insertion failed in the second step, all of those removals would be rolled back. I use the EntityManager to do the delete and insert. Here are the pseudocode of my method
void updateDB (){ | | removeRows(); | addRows(); | } | void removeRows(){ | //use EntityManager to remove | } | | void addRows(){ | //use EntityManager to insert some rows | } | Could anyone tell me how to make sure if the call to addRows failed, such as insert a duplicate row, would cause the removeRows rolledback? Thank you very much in advance, LNgo View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4031365#4031365 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031365 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user