Package org.drools.persistence.jta
Class TransactionLockInterceptor
- java.lang.Object
-
- org.drools.commands.fluent.PseudoClockRunner
-
- org.drools.commands.impl.AbstractInterceptor
-
- org.drools.persistence.jta.TransactionLockInterceptor
-
- All Implemented Interfaces:
org.drools.commands.ChainableRunner,org.drools.commands.InternalLocalRunner,org.kie.api.runtime.CommandExecutor,org.kie.api.runtime.ExecutableRunner<org.kie.api.runtime.RequestContext>
public class TransactionLockInterceptor extends org.drools.commands.impl.AbstractInterceptorExecutableInterceptor that will lock underlyingRunneruntil transaction completion. In case there is no transaction active lock is released directly. By default, interceptor is disabled and needs to be explicitly enabled in one of two ways:- using system property named
org.kie.tx.lock.enabledthat must be set to true - using environment entry named
TRANSACTION_LOCK_ENABLEDthat must be set to true
-
-
Constructor Summary
Constructors Constructor Description TransactionLockInterceptor(org.kie.api.runtime.Environment environment)TransactionLockInterceptor(org.kie.api.runtime.Environment environment, java.lang.String releaseTxKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoRelease()org.kie.api.runtime.RequestContextexecute(org.kie.api.runtime.Executable executable, org.kie.api.runtime.RequestContext ctx)protected voidrelease(TransactionManager txm)protected voidreleaseAfterFailure()-
Methods inherited from class org.drools.commands.impl.AbstractInterceptor
executeNext, getNext, setNext
-
-
-
-
Method Detail
-
execute
public org.kie.api.runtime.RequestContext execute(org.kie.api.runtime.Executable executable, org.kie.api.runtime.RequestContext ctx)- Specified by:
executein interfaceorg.kie.api.runtime.ExecutableRunner<org.kie.api.runtime.RequestContext>- Overrides:
executein classorg.drools.commands.fluent.PseudoClockRunner
-
release
protected void release(TransactionManager txm)
-
releaseAfterFailure
protected void releaseAfterFailure()
-
doRelease
protected void doRelease()
-
-