Class EmbeddedUserTransaction

  • All Implemented Interfaces:
    javax.transaction.UserTransaction

    public class EmbeddedUserTransaction
    extends java.lang.Object
    implements javax.transaction.UserTransaction
    A UserTransaction implementation that uses EmbeddedTransactionManager.

    This implementation does not support transaction timeout and it does not cancel long running transactions.

    See EmbeddedBaseTransactionManager for more details about its implementation.

    Since:
    9.0
    Author:
    Bela Ban, Pedro Ruivo
    See Also:
    EmbeddedBaseTransactionManager
    • Method Detail

      • begin

        public void begin()
                   throws javax.transaction.NotSupportedException,
                          javax.transaction.SystemException
        Specified by:
        begin in interface javax.transaction.UserTransaction
        Throws:
        javax.transaction.NotSupportedException
        javax.transaction.SystemException
      • commit

        public void commit()
                    throws javax.transaction.RollbackException,
                           javax.transaction.HeuristicMixedException,
                           javax.transaction.HeuristicRollbackException,
                           java.lang.SecurityException,
                           javax.transaction.SystemException
        Specified by:
        commit in interface javax.transaction.UserTransaction
        Throws:
        javax.transaction.RollbackException
        javax.transaction.HeuristicMixedException
        javax.transaction.HeuristicRollbackException
        java.lang.SecurityException
        javax.transaction.SystemException
      • rollback

        public void rollback()
                      throws java.lang.IllegalStateException,
                             javax.transaction.SystemException
        Specified by:
        rollback in interface javax.transaction.UserTransaction
        Throws:
        java.lang.IllegalStateException
        javax.transaction.SystemException
      • setRollbackOnly

        public void setRollbackOnly()
                             throws java.lang.IllegalStateException,
                                    javax.transaction.SystemException
        Specified by:
        setRollbackOnly in interface javax.transaction.UserTransaction
        Throws:
        java.lang.IllegalStateException
        javax.transaction.SystemException
      • getStatus

        public int getStatus()
                      throws javax.transaction.SystemException
        Specified by:
        getStatus in interface javax.transaction.UserTransaction
        Throws:
        javax.transaction.SystemException
      • setTransactionTimeout

        public void setTransactionTimeout​(int seconds)
                                   throws javax.transaction.SystemException
        Specified by:
        setTransactionTimeout in interface javax.transaction.UserTransaction
        Throws:
        javax.transaction.SystemException