org.hibernate.search.batchindexing
Class OptionallyWrapInJTATransaction

java.lang.Object
  extended by org.hibernate.search.batchindexing.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(SessionFactory factory, SessionAwareRunnable sessionAwareRunnable)
           
OptionallyWrapInJTATransaction(SessionFactory factory, 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(SessionFactory factory,
                                      SessionAwareRunnable sessionAwareRunnable)

OptionallyWrapInJTATransaction

public OptionallyWrapInJTATransaction(SessionFactory factory,
                                      StatelessSessionAwareRunnable statelessSessionAwareRunnable)
Method Detail

run

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


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved