public class TransactionalEventTransactionContext extends Object implements org.hibernate.search.backend.TransactionContext
TransactionContext interface. It retrieves
transaction context information from the TransactionManager that gets passed in as a
parameter upon instantiation.
It is used by the QueryInterceptor to pass transaction information to a Hibernate Search org.hibernate.search.backend.Work object.
QueryInterceptor| Constructor and Description |
|---|
TransactionalEventTransactionContext(TransactionManager transactionManager,
TransactionSynchronizationRegistry transactionSynchronizationRegistry)
Creates a new instance of NodeModifiedTransactionContext.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getTransactionIdentifier()
Returns a JTA transaction.
|
boolean |
isTransactionInProgress()
Returns a boolean value whether or not a transaction is in progress (JTA transaction and in this case *not* an
org.hibernate transaction).
|
void |
registerSynchronization(Synchronization synchronization)
Registers the synchronization passed in as a parameter with the ongoing transaction.
|
public TransactionalEventTransactionContext(TransactionManager transactionManager, TransactionSynchronizationRegistry transactionSynchronizationRegistry)
transactionManager - a NodeModifiedEvent to wrap. Should not be null.transactionSynchronizationRegistry - NullPointerException - if event is null.public boolean isTransactionInProgress()
isTransactionInProgress in interface org.hibernate.search.backend.TransactionContextpublic Object getTransactionIdentifier()
getTransactionIdentifier in interface org.hibernate.search.backend.TransactionContextTransactionManagerpublic void registerSynchronization(Synchronization synchronization)
registerSynchronization in interface org.hibernate.search.backend.TransactionContextsynchronization - synchronization to register. Must not be null.NullPointerException - if the synchronization is null.Copyright © 2013 JBoss, a division of Red Hat. All rights reserved.