Package io.micronaut.data.spring.jdbc
Class SpringJdbcTransactionOperations
java.lang.Object
io.micronaut.transaction.support.AbstractPropagatedStatusTransactionOperations<TransactionStatus<Connection>,Connection>
io.micronaut.data.spring.tx.AbstractSpringTransactionOperations
io.micronaut.data.spring.jdbc.SpringJdbcTransactionOperations
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescription@NonNull Connection
Obtains the connection for the current transaction.boolean
Check if the connection exists.Methods inherited from class io.micronaut.data.spring.tx.AbstractSpringTransactionOperations
doExecute, executeRead, executeWrite
Methods inherited from class io.micronaut.transaction.support.AbstractPropagatedStatusTransactionOperations
execute, extendCurrentPropagatedContext, findTransactionStatus
-
Method Details
-
getDataSource
-
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
-