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:
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 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
commit, doExecute, executeRead, executeWrite, getTransaction, rollback
Methods inherited from class io.micronaut.transaction.support.AbstractPropagatedStatusTransactionOperations
execute, extendCurrentPropagatedContext, findTransactionStatus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.transaction.TransactionOperations
execute, 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
-