Class SpringTransactionHandler
java.lang.Object
io.micronaut.configuration.jdbi.transaction.AbstractTransactionHandler
io.micronaut.configuration.jdbi.transaction.spring.SpringTransactionHandler
- All Implemented Interfaces:
TransactionHandler
@Requires(classes=org.springframework.transaction.PlatformTransactionManager.class)
@EachBean(org.springframework.transaction.PlatformTransactionManager.class)
public class SpringTransactionHandler
extends AbstractTransactionHandler
Allows Spring Transaction to be used with Jdbi.
- Since:
- 1.4.0
- Author:
- Dan Maas
-
Field Summary
Fields inherited from class io.micronaut.configuration.jdbi.transaction.AbstractTransactionHandler
didTxnRollback
-
Constructor Summary
ConstructorDescriptionSpringTransactionHandler
(org.springframework.transaction.PlatformTransactionManager transactionManager) Adapt aPlatformTransactionManager
to Jdbi transaction provider interface. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
boolean
isInTransaction
(Handle handle) void
releaseSavepoint
(Handle handle, String savepointName) void
void
rollbackToSavepoint
(Handle handle, String savepointName) void
Methods inherited from class io.micronaut.configuration.jdbi.transaction.AbstractTransactionHandler
inTransaction, inTransaction
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jdbi.v3.core.transaction.TransactionHandler
specialize
-
Constructor Details
-
SpringTransactionHandler
public SpringTransactionHandler(org.springframework.transaction.PlatformTransactionManager transactionManager) Adapt aPlatformTransactionManager
to Jdbi transaction provider interface.- Parameters:
transactionManager
- The transaction manager
-
-
Method Details
-
begin
-
commit
-
rollback
-
isInTransaction
-
savepoint
-
rollbackToSavepoint
-
releaseSavepoint
-