IBM WebSphere Extended Deployment (XD)TM
Release 6.0

com.ibm.websphere.objectgrid
TransactionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--com.ibm.websphere.objectgrid.ObjectGridException
                    |
                    +--com.ibm.websphere.objectgrid.TransactionException


An general transaction exception indicating something went wrong with a transaction. The #isTransactionActive() and #wasTransactionRolledBack() methods can be used to determine whether transaction is still active or was rolled back as a result of this exception occuring.

Field Summary
protected  booleanivTransactionRolledBack
           Indicates whether the transaction was rolled back or not.

Constructor Summary
TransactionException(java.lang.String, boolean)
           Constructs a new TransactionException with the specified detail message with a specified indication of whether the transaction was rolled back as a result of this exception.
TransactionException(java.lang.Throwable, boolean)
           Constructs a new TransactionException with a specified cause with a specified indication of whether the transaction was rolled back as a result of this exception.
TransactionException(java.lang.String, java.lang.Throwable, boolean)
           Constructs a new TransactionException with the specified detail message, cause, and indication of whether the transaction was rolled back as a result of this exception.


Method Summary
public  booleanisTransactionActive()
           Returns boolean true if the transaction is active. Otherwise, false.
public  booleanwasTransactionRolledBack()
           Returns boolean true if the transaction was rolled back.

Inherited Methods

Methods inherited from com.ibm.websphere.objectgrid.ObjectGridException
getCause, initCause, printStackTrace, printStackTrace, printStackTrace
Methods inherited from java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, setStackTrace, toString
Methods inherited from java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

ivTransactionRolledBack

protected 
  ivTransactionRolledBack
Indicates whether the transaction was rolled back or not.

Constructor Detail

TransactionException

public TransactionException( String message,boolean rolledBack)
Constructs a new TransactionException with the specified detail message with a specified indication of whether the transaction was rolled back as a result of this exception. The cause is not initialized, and may subsequently be initialized by a call to #initCause(Throwable). This constructor is useful as a wrapper of other Throwable objects.
Parameters:
message - the detail message. The detail message is saved for later retrieval by the #getMessage()method.
rolledBack - A value of true indicates the transaction was rolled back.


TransactionException

public TransactionException( Throwable cause,boolean rolledBack)
Constructs a new TransactionException with a specified cause with a specified indication of whether the transaction was rolled back as a result of this exception. The cause and a detail message of (cause==null ? null : cause.toString()) is used (which typically contains the class and detail message of cause). This constructor is useful for as a wrapper for other Throwable objects that occur.
Parameters:
cause - the cause (which is saved for later retrieval by the #getCause()method). (Anull value is permitted, and indicates that the cause is nonexistent or unknown.)
rolledBack - A value of true indicates the transaction was rolled back.


TransactionException

public TransactionException( String message,Throwable cause,boolean rolledBack)
Constructs a new TransactionException with the specified detail message, cause, and indication of whether the transaction was rolled back as a result of this exception.

Note that the detail message associated with cause is not automatically incorporated in this TransactionException's detail message.

Parameters:
message - the detail message (which is saved for later retrieval by the #getMessage()method).
cause - the cause (which is saved for later retrieval by the #getCause()method). (Anull value is permitted, and indicates that the cause is nonexistent or unknown.)
rolledBack - A value of true indicates the transaction was rolled back.


Method Detail

isTransactionActive

public boolean isTransactionActive()
Returns boolean true if the transaction is active. Otherwise, false is returned to indicate either transaction never started or was completed.


Returns:
     true if the transaction is active


wasTransactionRolledBack

public boolean wasTransactionRolledBack()
Returns boolean true if the transaction was rolled back.


Returns:
     true if the transaction was rolled back


IBM WebSphere Extended Deployment (XD)TM
Release 6.0