[jboss-user] [JBoss Cache Users] - How to manage an exception that occurs in the commit or roll

nfilotto do-not-reply at jboss.com
Tue Dec 1 13:13:34 EST 2009


Hi,

I'm trying to ensure the integrity of my data thanks to the TransactionManager. However, I met an issue during my study, I noticed that if I implement my own CacheLoder and an error occurs during the commit phase, the TM is never aware of this error since the commit is done in the afterCompletion of TxInterceptor$RemoteSynchronizationHandler and the exception is eaten by this method. According to the JTA specification, the afterCompletion method is not supposed to notify the TM when something wrong occured but my questions are the following:
1. Is-it normal that the commit is done in the afterCompletion? it should be done before the afterCompletion
2. What are we supposed to do? Up to now, we decided to commit in the prepare phase which is done in the beforeCompletion method if an error occurs the TM is notified and can call the rollback method but is-there a better solution?

Thank you in advance for your help,
BR,
Nicolas Filotto

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268358#4268358

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268358



More information about the jboss-user mailing list