Class ContainerManagedTransactionDisposeCommand

  • All Implemented Interfaces:
    Serializable, org.kie.api.command.Command<Void>, org.kie.api.command.ExecutableCommand<Void>

    public class ContainerManagedTransactionDisposeCommand
    extends Object
    implements org.kie.api.command.ExecutableCommand<Void>
    Dispose command that is dedicated to be used in container managed environments instead of default way of disposing ksession
    ksession.dispose().
    If transaction is active it will delegate the actual disposal to afterCompletion phase of transaction instead of executing it directly. Although when there is no active transaction or no transaction at all it will dispose ksession immediately.
    It relies on TransactionManager being available in ksession's environment:
    ksession.getEnvironment().get(EnvironmentName.TRANSACTION_MANAGER)
    See Also:
    Serialized Form
    • Constructor Detail

      • ContainerManagedTransactionDisposeCommand

        public ContainerManagedTransactionDisposeCommand()
    • Method Detail

      • execute

        public Void execute​(org.kie.api.runtime.Context context)
        Specified by:
        execute in interface org.kie.api.command.ExecutableCommand<Void>