org.hibernate.search.batchindexing
Class OptionallyWrapInJTATransaction
java.lang.Object
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
Method Summary |
void |
run()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OptionallyWrapInJTATransaction
public OptionallyWrapInJTATransaction(SessionFactory factory,
SessionAwareRunnable sessionAwareRunnable)
OptionallyWrapInJTATransaction
public OptionallyWrapInJTATransaction(SessionFactory factory,
StatelessSessionAwareRunnable statelessSessionAwareRunnable)
run
public void run()
- Specified by:
run
in interface Runnable
Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved