Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.transaction
Class TransactionSystemException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  org.springframework.core.NestedRuntimeException
                      org.springframework.transaction.TransactionException
                          org.springframework.transaction.TransactionSystemException

All Implemented Interfaces:
  java.io.Serializable

    public class TransactionSystemException

extends TransactionException

Exception thrown when a general transaction system error is encountered, like on commit or rollback.

Since:
  24.03.2003
Author:
  Juergen Hoeller
See Also:
  Serialized Form

Constructor Summary
`TransactionSystemException(java.lang.String msg)` Constructor for TransactionSystemException.
`TransactionSystemException(java.lang.String msg, java.lang.Throwable cause)` Constructor for TransactionSystemException.

Method Summary
`boolean` | `contains(java.lang.Class exType)` Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.
`java.lang.Throwable` | `getApplicationException()` Return the application exception that was thrown before this transaction exception, if any.
`java.lang.Throwable` | `getOriginalException()` Return the exception that was the first to be thrown within the failed transaction: i.e.
`void` | `initApplicationException(java.lang.Throwable ex)` Set an application exception that was thrown before this transaction exception, preserving the original exception despite the overriding TransactionSystemException.

Methods inherited from class org.springframework.core.NestedRuntimeException
`getMessage, getMostSpecificCause, getRootCause`

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TransactionSystemException

    public TransactionSystemException(java.lang.String msg)

  Constructor for TransactionSystemException.

  Parameters:
    `msg` - the detail message

### TransactionSystemException

    public TransactionSystemException(java.lang.String msg,
                                      java.lang.Throwable cause)

  Constructor for TransactionSystemException.

  Parameters:
    `msg` - the detail message
    `cause` - the root cause from the transaction API in use

Method Detail

### initApplicationException

    public void initApplicationException(java.lang.Throwable ex)

  Set an application exception that was thrown before this transaction exception, preserving the original exception despite the overriding TransactionSystemException.

  Parameters:
    `ex` - the application exception
  Throws:
    `java.lang.IllegalStateException` - if this TransactionSystemException already holds an application exception

### getApplicationException

    public final java.lang.Throwable getApplicationException()

  Return the application exception that was thrown before this transaction exception, if any.

  Returns:
    the application exception, or `null` if none set

### getOriginalException

    public java.lang.Throwable getOriginalException()

  Return the exception that was the first to be thrown within the failed transaction: i.e. the application exception, if any, or the TransactionSystemException's own cause.

  Returns:
    the original exception, or `null` if there was none

### contains

    public boolean contains(java.lang.Class exType)

  Description copied from class: `NestedRuntimeException`
  Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.

  Overrides:
    `contains` in class `NestedRuntimeException`
  Parameters:
    `exType` - the exception type to look for
  Returns:
    whether there is a nested exception of the specified type

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD