Class AbortTransactionException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- de.aristaflow.adept2.base.service.ADEPT2ServiceException
-
- de.aristaflow.adept2.base.service.AbortTransactionException
-
- All Implemented Interfaces:
Serializable
public class AbortTransactionException extends ADEPT2ServiceException
AnAbortTransactionException
indicates that a transaction in a service cannot be completed and therefore has to be aborted. This differs from anInvalidServiceStateException
which indicates that the complete service cannot handle any requests while a request replied to with anAbortTransactionException
can be retried.
Since most (Runtime
)Exception
s will lead more or less to an abort of the current transaction, a receiver of this exception usually can check the inner exception of anAbortTransactionException
.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SessionToken
session
The session token that initiated the transaction that is to be aborted.
-
Constructor Summary
Constructors Constructor Description AbortTransactionException(SessionToken session, String message)
Create a new exception to abort the transaction for the designated session token having the designated description.AbortTransactionException(SessionToken session, String message, Throwable cause)
Create a new exception to abort the transaction for the designated session token having the designated description and cause.AbortTransactionException(SessionToken session, Throwable cause)
Create a new exception to abort the transaction for the designated session token having the designated cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionToken
getSession()
Gets the session that initiated the transaction to be aborted.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
session
protected final SessionToken session
The session token that initiated the transaction that is to be aborted.
-
-
Constructor Detail
-
AbortTransactionException
public AbortTransactionException(SessionToken session, String message)
Create a new exception to abort the transaction for the designated session token having the designated description.- Parameters:
session
- The session that initiated the transaction to be aborted.message
- A textual description for the cause of the abortion.
-
AbortTransactionException
public AbortTransactionException(SessionToken session, Throwable cause)
Create a new exception to abort the transaction for the designated session token having the designated cause.- Parameters:
session
- The session that initiated the transaction to be aborted.cause
- The cause for the abortion of the transaction.
-
AbortTransactionException
public AbortTransactionException(SessionToken session, String message, Throwable cause)
Create a new exception to abort the transaction for the designated session token having the designated description and cause.- Parameters:
session
- The session that initiated the transaction to be aborted.message
- A textual description for the cause of the abortion.cause
- The cause for the abortion of the transaction.
-
-
Method Detail
-
getSession
public SessionToken getSession()
Gets the session that initiated the transaction to be aborted.- Returns:
- The session that initiated the transaction to be aborted.
-
-