Class StandaloneMybatisTransactionContext

    • Constructor Detail

      • StandaloneMybatisTransactionContext

        public StandaloneMybatisTransactionContext​(CommandContext commandContext)
    • Method Detail

      • fireTransactionEvent

        protected void fireTransactionEvent​(TransactionState transactionState,
                                            boolean executeInNewContext)
        Fires the event for the provided TransactionState.
        Parameters:
        transactionState - The TransactionState for which the listeners will be called.
        executeInNewContext - If true, the listeners will be called in a new command context. This is needed for example when firing the TransactionState.COMMITTED event: the transacation is already committed and executing logic in the same context could lead to strange behaviour (for example doing a SqlSession.update(String) would actually roll back the update (as the MyBatis context is already committed and the internal flags have not been correctly set).
      • executeTransactionListeners

        protected void executeTransactionListeners​(java.util.List<TransactionListener> transactionListeners,
                                                   CommandContext commandContext)
      • getDbSqlSession

        protected DbSqlSession getDbSqlSession()