javax.transaction
Class RollbackException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.transaction.RollbackException
- All Implemented Interfaces:
- Serializable
public class RollbackException
- extends Exception
The RollbackException exception indicates that either the transaction
has been rolled back or an operation cannot complete because the
transaction is marked for rollback only.
It is thrown under two circumstances:
-
At transaction commit time, if the transaction has been marked for
rollback only. In this case, the
commit
method will roll
back the transaction and throw this exception to indicate that the
transaction could not be committed.
-
At other times, if an operation cannot be completed because the
transaction is marked for rollback only.
The
enlistResource
and registerSynchronization
methods in the Transaction
interface throw this exception to
indicate that the operation cannot be completed because the transaction
is marked for rollback only. In this case, the state of the transaction
remains unchanged.
- Version:
- $Revision: 1.2.26.1 $
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
RollbackException
public RollbackException()
- Creates a new
RollbackException
without a detail message.
RollbackException
public RollbackException(String msg)
- Constructs an
RollbackException
with the specified
detail message.
- Parameters:
msg
- the detail message.
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.