IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid
Class TransactionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ibm.websphere.objectgrid.ObjectGridException
              extended by com.ibm.websphere.objectgrid.TransactionException
All Implemented Interfaces:
IObjectGridException, Serializable
Direct Known Subclasses:
SessionNotReentrantException, TransactionAlreadyActiveException

public class TransactionException
extends ObjectGridException

A 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.

Since:
WAS XD 6.0, XC10
See Also:
Serialized Form

Field Summary
protected  boolean ivTransactionRolledBack
          Indicates whether the transaction was rolled back or not.
 
Constructor Summary
TransactionException(String message, boolean rolledBack)
          Constructs a new TransactionException with the specified detail message and a special indication of whether the transaction was rolled back as a result of this exception.
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.
TransactionException(String message, TransactionException 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.
TransactionException(Throwable cause, boolean rolledBack)
          Constructs a new TransactionException with a specified cause and a specified indication of whether the transaction was rolled back as a result of this exception.
TransactionException(TransactionException cause, boolean rolledBack)
          Constructs a new TransactionException with a specified cause and a specified indication of whether the transaction was rolled back as a result of this exception.
 
Method Summary
 boolean isTransactionActive()
          Returns true if the transaction is active.
 boolean wasTransactionRolledBack()
          Returns true if the transaction was rolled back.
 
Methods inherited from class com.ibm.websphere.objectgrid.ObjectGridException
getCause, initCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ivTransactionRolledBack

protected boolean 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 and a special 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 the initCause method.

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.
See Also:
ObjectGridException.initCause(Throwable), Throwable.getMessage(), wasTransactionRolledBack()

TransactionException

public TransactionException(Throwable cause,
                            boolean rolledBack)
Constructs a new TransactionException with a specified cause and 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 - is the exception that caused this exception to be thrown, which is saved for later retrieval by the getCause() method. A null value is permitted and indicates that the cause is nonexistent or is unknown.
rolledBack - A value of true indicates the transaction was rolled back.
See Also:
ObjectGridException.getCause(), wasTransactionRolledBack()

TransactionException

public TransactionException(TransactionException cause,
                            boolean rolledBack)
Constructs a new TransactionException with a specified cause and 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 - is the exception that caused this exception to be thrown, which is saved for later retrieval by the getCause() method. A null value is permitted and indicates that the cause is nonexistent or is unknown.
rolledBack - A value of true indicates the transaction was rolled back.
Since:
WAS XD 6.1 IFIX1
See Also:
ObjectGridException.getCause(), wasTransactionRolledBack()

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.
See Also:
ObjectGridException.getCause(), Throwable.getMessage(), wasTransactionRolledBack()

TransactionException

public TransactionException(String message,
                            TransactionException 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.
Since:
WAS XD 6.1 IFIX1
See Also:
ObjectGridException.getCause(), Throwable.getMessage(), wasTransactionRolledBack()
Method Detail

isTransactionActive

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

Returns:
true if the transaction is active

wasTransactionRolledBack

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

Returns:
true if the transaction was rolled back

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.