|
From: Andy D. <an...@ma...> - 2005-11-03 16:39:29
|
On Thursday 03 November 2005 05:22 am, Juergen Hoeller wrote:
> Actually, a RollbackException on the final commit might be appropriate, if
> the transaction has been marked as rollback-only by some process outside
> the application, with the application nevertheless invoking commit rather
> than rollback. It simply indicates that the commit did not succeed, at the
> appropriate place: that is, at transaction completion.
>
> However, we'd of course have to explicitly clarify what kind of Exception
> "resume" might throw that we can recover from. "TransactionManager.resume"
> doesn't declare a RollbackException, so it would - generally - have to be
> an InvalidTransactionException, IllegalStateException or SystemException.
> If it's a SystemException in case of JOTM, that's of course not
> particularly expressive...
>
> Juergen
Below is the stack trace I'm getting. Your hunch is correct, and it is indeed
throwing a SystemException:
JTA failure on resume; nested exception is javax.transaction.SystemException:
RollbackException in occured in resume() Transaction already marked for
rollback org.springframework.transaction.TransactionSystemException: JTA
failure on resume; nested exception is javax.transaction.SystemException:
RollbackException in occured in resume() Transaction already marked for
rollback
javax.transaction.SystemException: RollbackException in occured in resume()
Transaction already marked for rollback
at org.objectweb.jotm.Current.resume(Current.java:786)
at
org.springframework.transaction.jta.JtaTransactionManager.doJtaResume(JtaTransactionManager.java:769)
at
org.springframework.transaction.jta.JtaTransactionManager.doResume(JtaTransactionManager.java:741)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.resume(AbstractPlatformTransactionManager.java:432)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:755)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:536)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:468)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:126)
at com.marathon.JotmTest$1.doInTransactionWithoutResult(JotmTest.java:71)
at
org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:114)
at
com.marathon.JotmTest.testSuspendAndResumeOfRollbackOnlyTransactionWithEnslistedResource(JotmTest.java:57)
This certainly complicates things. :(
- Andy
|