Class TransactionalException

  • All Implemented Interfaces:
    java.io.Serializable

    public class TransactionalException
    extends java.lang.RuntimeException
    The TransactionalException thrown from the Transactional interceptors implementation contains the original exception as its nested exception and is a RuntimeException, therefore, by default any transaction that was started as a result of a Transactional annotation earlier in the call stream will be marked for rollback as a result of the TransactionalException being thrown by the Transactional interceptor of the second bean. For example if a transaction is begun as a result of a call to a bean annotated with Transactional(TxType.REQUIRED) and this bean in turn calls a second bean annotated with Transactional(TxType.NEVER), the transaction begun by the first bean will be marked for rollback.
    Since:
    JTA 1.2
    Version:
    Jakarta Transactions 2.0
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID
      Specify serialVersionUID for backward compatibility
    • Constructor Summary

      Constructors 
      Constructor Description
      TransactionalException​(java.lang.String s, java.lang.Throwable throwable)  
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Specify serialVersionUID for backward compatibility
        See Also:
        Constant Field Values
    • Constructor Detail

      • TransactionalException

        public TransactionalException​(java.lang.String s,
                                      java.lang.Throwable throwable)