[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Question about Transaction timeouts and Journal
clebert.suconic@jboss.com
do-not-reply at jboss.com
Thu Jul 24 00:56:13 EDT 2008
"timfox" wrote : "clebert.suconic at jboss.com" wrote :
| | it won't be possible to retry or rollback the transaction if a timeout happened during the writeTransaction.
| |
|
| Why?
http://anonsvn.jboss.org/repos/messaging/trunk/src/main/org/jboss/messaging/core/journal/impl/JournalImpl.java
| public void appendCommitRecord(final long txID) throws Exception
| {
| if (state != STATE_LOADED)
| {
| throw new IllegalStateException("Journal must be loaded first");
| }
|
| JournalTransaction tx = transactionInfos.remove(txID);
|
| if (tx == null)
| {
| throw new IllegalStateException("Cannot find tx with id " + txID);
| }
|
| JournalFile usedFile = writeTransaction(COMMIT_RECORD, txID, tx);
|
| transactionCallbacks.remove(txID);
|
| tx.commit(usedFile);
|
| }
|
transactionsInfo is removed before writeTransaction is completed.
If the transaction times out, during a retry... you would get the exception thrown by "cannot find tx with id " + txID, and doesn't seem the right behavior to me.
I'm writing a testcase where that is failing.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4166299#4166299
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4166299
More information about the jboss-dev-forums
mailing list