Package 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:
- Serializable
Exception thrown when a general transaction system error is encountered,
 like on commit or rollback.
- Since:
- 24.03.2003
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConstructor for TransactionSystemException.TransactionSystemException(String msg, Throwable cause) Constructor for TransactionSystemException.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCheck 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.final ThrowableReturn the application exception that was thrown before this transaction exception, if any.Return the exception that was the first to be thrown within the failed transaction: i.e.voidSet 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.NestedRuntimeExceptiongetMostSpecificCause, getRootCauseMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
TransactionSystemExceptionConstructor for TransactionSystemException.- Parameters:
- msg- the detail message
 
- 
TransactionSystemExceptionConstructor for TransactionSystemException.- Parameters:
- msg- the detail message
- cause- the root cause from the transaction API in use
 
 
- 
- 
Method Details- 
initApplicationExceptionSet an application exception that was thrown before this transaction exception, preserving the original exception despite the overriding TransactionSystemException.- Parameters:
- ex- the application exception
- Throws:
- IllegalStateException- if this TransactionSystemException already holds an application exception
 
- 
getApplicationExceptionReturn the application exception that was thrown before this transaction exception, if any.- Returns:
- the application exception, or nullif none set
 
- 
getOriginalExceptionReturn 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 nullif there was none
 
- 
containsDescription copied from class:NestedRuntimeExceptionCheck 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:
- containsin class- NestedRuntimeException
- Parameters:
- exType- the exception type to look for
- Returns:
- whether there is a nested exception of the specified type
 
 
-