Interface ITransaction

All Superinterfaces:
AutoCloseable, Closeable

@Deprecated public interface ITransaction extends Closeable
Deprecated.
Needs to sit in a JPMS module for proper use.
Common interface representing a transaction. This interface provides methods to manage the transaction lifecycle, including committing and rolling back transactions.

Note: Transactions need be set to be committed on close explicitly by calling commit(). Otherwise, the transaction will be rolled back automatically when the context is closed.

This interface extends Closeable to allow for automatic resource management, ensuring that the transaction is properly closed and resources are released.

Note: This interface is intended for internal use only and should not be implemented by plugins. It may be moved to a different package in the future, so plugins should not depend on it.

Since:
8.5.0
Author:
Norman Lorenz
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Closes the transaction, committing the JPA transaction if set to do so.
    void
    Deprecated.
    Marks the transaction to be committed when the transaction context is closed.
    boolean
    Deprecated.
    Checks if the transaction is marked to be committed when it is closed.
    void
    Deprecated.
    Marks the transaction to be rolled back when the transaction context is closed.
  • Method Details

    • close

      void close()
      Deprecated.
      Closes the transaction, committing the JPA transaction if set to do so.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      See Also:
    • commit

      void commit()
      Deprecated.
      Marks the transaction to be committed when the transaction context is closed.
      See Also:
    • isCommit

      boolean isCommit()
      Deprecated.
      Checks if the transaction is marked to be committed when it is closed.
      Returns:
      true if the transaction is set to be committed, false otherwise
      See Also:
    • rollback

      void rollback()
      Deprecated.
      Marks the transaction to be rolled back when the transaction context is closed.
      See Also: