org.hibernate.search.batchindexing.impl
Class OptionallyWrapInJTATransaction

java.lang.Object
  extended by org.hibernate.search.batchindexing.impl.OptionallyWrapInJTATransaction
All Implemented Interfaces:
Runnable

public class OptionallyWrapInJTATransaction
extends Object
implements Runnable

Wrap the subsequent Runnable in a JTA Transaction if necessary: - if the existing Hibernate Core transaction strategy requires a TransactionManager - if no JTA transaction is already started Unfortunately at this time we need to have access to SessionFactoryImplementor

Author:
Emmanuel Bernard

Constructor Summary
OptionallyWrapInJTATransaction(BatchTransactionalContext batchContext, SessionAwareRunnable sessionAwareRunnable)
           
OptionallyWrapInJTATransaction(BatchTransactionalContext batchContext, StatelessSessionAwareRunnable statelessSessionAwareRunnable)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionallyWrapInJTATransaction

public OptionallyWrapInJTATransaction(BatchTransactionalContext batchContext,
                                      SessionAwareRunnable sessionAwareRunnable)

OptionallyWrapInJTATransaction

public OptionallyWrapInJTATransaction(BatchTransactionalContext batchContext,
                                      StatelessSessionAwareRunnable statelessSessionAwareRunnable)
Method Detail

run

public void run()
Specified by:
run in interface Runnable


Copyright © 2006–2013 Hibernate. All rights reserved.