Drools :: Persistence :: JPA 6.2.0.CR4

org.drools.persistence.jta
Class TransactionLockInterceptor

java.lang.Object
  extended by org.drools.core.command.impl.AbstractInterceptor
      extended by org.drools.persistence.jta.TransactionLockInterceptor
All Implemented Interfaces:
org.drools.core.command.CommandService, org.drools.core.command.Interceptor, org.kie.api.runtime.CommandExecutor

public class TransactionLockInterceptor
extends org.drools.core.command.impl.AbstractInterceptor

Interceptor that will lock underlying CommandService until 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:


Constructor Summary
TransactionLockInterceptor(org.kie.api.runtime.Environment environment)
           
TransactionLockInterceptor(org.kie.api.runtime.Environment environment, String releaseTxKey)
           
 
Method Summary
<T> T
execute(org.kie.api.command.Command<T> command)
           
protected  void release(TransactionManager txm)
           
 
Methods inherited from class org.drools.core.command.impl.AbstractInterceptor
executeNext, getContext, getNext, setNext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionLockInterceptor

public TransactionLockInterceptor(org.kie.api.runtime.Environment environment)

TransactionLockInterceptor

public TransactionLockInterceptor(org.kie.api.runtime.Environment environment,
                                  String releaseTxKey)
Method Detail

execute

public <T> T execute(org.kie.api.command.Command<T> command)

release

protected void release(TransactionManager txm)

Drools :: Persistence :: JPA 6.2.0.CR4

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.