Class SpringJdbcTransactionOperations

All Implemented Interfaces:
SynchronousTransactionManager<Connection>, TransactionManager, TransactionOperations<Connection>

@EachBean(org.springframework.jdbc.datasource.DataSourceTransactionManager.class) @Internal @Requires(classes=org.springframework.jdbc.datasource.DataSourceTransactionManager.class, condition=io.micronaut.data.spring.jdbc.SpringJdbcTransactionManagerCondition.class) public final class SpringJdbcTransactionOperations extends AbstractSpringTransactionOperations
Default implementation of TransactionOperations that uses Spring managed transactions.
Since:
1.0.0
Author:
graemerocher
  • Method Details

    • getDataSource

      public DataSource getDataSource()
    • getConnection

      @NonNull public @NonNull Connection getConnection()
      Description copied from interface: TransactionOperations
      Obtains the connection for the current transaction.
      Returns:
      The connection
    • hasConnection

      public boolean hasConnection()
      Description copied from interface: TransactionOperations
      Check if the connection exists.
      Returns:
      True if transaction exists