Class TransactionImpl

    • Method Detail

      • begin

        public void begin()
        Specified by:
        begin in interface jakarta.persistence.EntityTransaction
      • commit

        public void commit()
        Specified by:
        commit in interface jakarta.persistence.EntityTransaction
      • rollback

        public void rollback()
        Specified by:
        rollback in interface jakarta.persistence.EntityTransaction
      • isActive

        public boolean isActive()
        Specified by:
        isActive in interface jakarta.persistence.EntityTransaction
      • isActive

        public boolean isActive​(boolean isMarkedForRollbackConsideredActive)
        Description copied from interface: TransactionImplementor
        Indicate whether a resource transaction is in progress.
        Specified by:
        isActive in interface TransactionImplementor
        Parameters:
        isMarkedForRollbackConsideredActive - whether to consider TransactionStatus.MARKED_ROLLBACK as active.
        Returns:
        boolean indicating whether transaction is in progress
      • getStatus

        public TransactionStatus getStatus()
        Description copied from interface: Transaction
        Get the current local status of this transaction.

        This only accounts for the local view of the transaction status. In other words it does not check the status of the actual underlying transaction.

        Specified by:
        getStatus in interface Transaction
        Returns:
        The current local status.
      • registerSynchronization

        public void registerSynchronization​(jakarta.transaction.Synchronization synchronization)
                                     throws HibernateException
        Description copied from interface: Transaction
        Register a user synchronization callback for this transaction.
        Specified by:
        registerSynchronization in interface Transaction
        Parameters:
        synchronization - The Synchronization callback to register.
        Throws:
        HibernateException - Indicates a problem registering the synchronization.
      • setTimeout

        public void setTimeout​(int seconds)
        Description copied from interface: Transaction
        Set the transaction timeout for any transaction started by a subsequent call to EntityTransaction.begin() on this instance.
        Specified by:
        setTimeout in interface Transaction
        Parameters:
        seconds - The number of seconds before a timeout.
      • getTimeout

        public int getTimeout()
        Description copied from interface: Transaction
        Retrieve the transaction timeout set for this transaction. A negative indicates no timeout has been set.
        Specified by:
        getTimeout in interface Transaction
        Returns:
        The timeout, in seconds.
      • markRollbackOnly

        public void markRollbackOnly()
        Description copied from interface: Transaction
        Make a best effort to mark the underlying transaction for rollback only.
        Specified by:
        markRollbackOnly in interface Transaction
      • setRollbackOnly

        public void setRollbackOnly()
        Specified by:
        setRollbackOnly in interface jakarta.persistence.EntityTransaction
      • getRollbackOnly

        public boolean getRollbackOnly()
        Specified by:
        getRollbackOnly in interface jakarta.persistence.EntityTransaction
      • allowFailedCommitToPhysicallyRollback

        protected boolean allowFailedCommitToPhysicallyRollback()