Re: inconsistent exception usage + question
Bob Scheifler <[email protected]> Thu, 29 May 2008 14:34:39 -0400
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
> 2) Aborting that transaction results in a CannotAbortException (which > has no cause included). > Why does the failed abort result in CannotAbort? Good question, looks like an implementation bug to me. (Feel free to file an Apache River JIRA bug.) The spec seems clear that CannotAbortException should only be thrown if the transaction manager knows the transaction previously committed. > I'm using the TransactionFactory presently, and the only way I see of > testing the remaining lease time of a transaction is by getting its > lease and checking the expiration against currentTimeMillis. > > Is there a more elegant way to determine if the transaction has expired > due to a timeout? You can query the transaction manager directly about the state of the transaction, but if it's unknown, you can't determine that it was due to lease expiration unless you know no commit/abort has been attempted. - Bob =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff JAVASPACES-USERS". For general help, send email to [email protected] and include in the body of the message "help". To view past JAVASPACES-USERS postings, please see: http://archives.java.sun.com/archives/javaspaces-users.html