|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.mbs.services.transaction.TransactionException
public class TransactionException
TransactionException exception is thrown when the transaction has been marked
for rollback only or the transaction has been rolled back instead of
committed. This is a local exception thrown by methods in the
Transaction interface.
| Field Summary | |
|---|---|
static int |
HEURISTICS_COMMIT_ERROR
A transaction resource has failed during the 2nd, commit phase, of the commit process. |
static int |
HEURISTICS_ROLLBACK_ERROR
A transaction resource has failed during rollback. |
static int |
RESOURCE_ERROR
A transaction resource has failed during the 1st, prepare phase of the commit process. |
static int |
STATE_ERROR
This error code is assigned, when the Transaction.commit() method
is invoked and Transaction is not in active state, or was marked as
rollback only. |
static int |
THREADS_NOT_FINISHED_ERROR
This error code is assigned, when the Transaction.commit() method
is invoked and Transaction is assigned to more than one thread. |
static int |
TIMEOUT_ERROR
A transaction cannot be committed because it has expired. |
static int |
UNDEFINED
Undefined error code |
| Constructor Summary | |
|---|---|
TransactionException()
Creates new transaction exception |
|
TransactionException(int errorCode)
Creates a new transaction exception with the specified error code. |
|
TransactionException(java.lang.String message)
Creates new transaction exception, with specified error message |
|
TransactionException(java.lang.String message,
java.lang.Throwable nested)
Creates new transaction exception, with specified error message and nested cause |
|
TransactionException(java.lang.String message,
java.lang.Throwable nested,
int errorCode)
Creates new transaction exception, with specified error message and nested cause. |
|
| Method Summary | |
|---|---|
int |
getErrorCode()
Used to obtain the error code |
java.lang.Throwable |
getNestedException()
Used to obtain the nested exception |
void |
printStackTrace(java.io.PrintStream out)
|
void |
printStackTrace(java.io.PrintWriter out)
|
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int UNDEFINED
public static final int THREADS_NOT_FINISHED_ERROR
Transaction.commit() method
is invoked and Transaction is assigned to more than one thread.
public static final int STATE_ERROR
Transaction.commit() method
is invoked and Transaction is not in active state, or was marked as
rollback only.
In this case, the application may check
TransactionContext.getStatus() method.
public static final int RESOURCE_ERROR
TransactionResource.prepare(TransactionContext),
Constant Field Valuespublic static final int HEURISTICS_COMMIT_ERROR
RuntimeException
TransactionResource#commit(TransactionContext)
public static final int HEURISTICS_ROLLBACK_ERROR
RuntimeException
TransactionResource.rollback(TransactionContext),
Constant Field Valuespublic static final int TIMEOUT_ERROR
| Constructor Detail |
|---|
public TransactionException()
public TransactionException(int errorCode)
errorCode - the error codepublic TransactionException(java.lang.String message)
message - description of the error
public TransactionException(java.lang.String message,
java.lang.Throwable nested)
message - description of the errornested - the nested cause
public TransactionException(java.lang.String message,
java.lang.Throwable nested,
int errorCode)
message - description of the errornested - the nested causeerrorCode - the error code| Method Detail |
|---|
public java.lang.Throwable getNestedException()
public int getErrorCode()
public void printStackTrace(java.io.PrintStream out)
printStackTrace in class java.lang.ThrowableThrowable.printStackTrace(java.io.PrintStream)public void printStackTrace(java.io.PrintWriter out)
printStackTrace in class java.lang.ThrowableThrowable.printStackTrace(java.io.PrintWriter)
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||