public class HGUserAbortException extends RuntimeException
This exception is to be thrown by application code to force aborting the current transaction within a transaction closure.
When using the
HGTransactionManager.transact method, one supplies
a transaction closure, a
Callable instance that perform the transaction
work. However, the
transact will always attempt to commit the
transaction upon return from the user supplied
Callable. If the
application decides to abort the transaction without retrying it, it should throw
this exception instead of calling
HGTransactionManager.abort. The alternative
would be for the application to implement its own transaction retry loop, which is
longer and error prone.
|Constructor and Description|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright © 2015. All rights reserved.