Class AbortTransactionException

  • All Implemented Interfaces:
    Serializable

    public class AbortTransactionException
    extends ADEPT2ServiceException
    An AbortTransactionException indicates that a transaction in a service cannot be completed and therefore has to be aborted. This differs from an InvalidServiceStateException which indicates that the complete service cannot handle any requests while a request replied to with an AbortTransactionException can be retried.
    Since most (Runtime)Exceptions will lead more or less to an abort of the current transaction, a receiver of this exception usually can check the inner exception of an AbortTransactionException.
    See Also:
    Serialized Form
    • 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.