Class CoroutineTxHelper


  • @Internal
    @Singleton
    @Requires(classes=kotlin.coroutines.CoroutineContext.class)
    public final class CoroutineTxHelper
    extends java.lang.Object
    Helper to setup Kotlin coroutine context.
    Since:
    3.3
    Author:
    Denis Stepanov
    • Constructor Detail

      • CoroutineTxHelper

        public CoroutineTxHelper()
    • Method Detail

      • setupTxState

        public void setupTxState​(io.micronaut.aop.kotlin.KotlinInterceptedMethod kotlinInterceptedMethod,
                                 TransactionSynchronizationManager.TransactionSynchronizationState state)
        Extract the TX state from the Kotlin's context or takes the thread-local context.
        Parameters:
        state - The transaction state
        kotlinInterceptedMethod - The intercepted method