public abstract class AlfrescoTransactionSupport
extends org.alfresco.util.transaction.TransactionSupportUtil
TransactionSynchronization
instances
are registered on behalf of the application code.
This class remains for backward API compatibility, the majority of transaction support has been moved to TransactionSupportUtil in the Core project.
Modifier and Type | Class and Description |
---|---|
static class |
AlfrescoTransactionSupport.TxnReadState |
Modifier and Type | Field and Description |
---|---|
static int |
SESSION_SYNCHRONIZATION_ORDER
The order of synchronization set to be 100 less than the Hibernate synchronization order
|
Constructor and Description |
---|
AlfrescoTransactionSupport() |
Modifier and Type | Method and Description |
---|---|
static void |
bindDaoService(TransactionalDao daoService)
Method that registers a NodeDaoService against the transaction.
|
static void |
bindIntegrityChecker(IntegrityChecker integrityChecker)
Method that registers an IntegrityChecker against the transaction.
|
static void |
bindListener(TransactionListener listener)
Method maintained for backward compatibility:
ACE-2801: Package change for TransactionListener.
|
static void |
bindListener(org.alfresco.util.transaction.TransactionListener listener)
Method that registers a Listener against
the transaction.
|
static void |
bindLucene(LuceneIndexerAndSearcher indexerAndSearcher)
Method that registers a LuceneIndexerAndSearcherFactory against
the transaction.
|
static void |
checkTransactionReadState(boolean requireReadWrite)
Checks the state of the current transaction and throws an exception if a transaction
is not present or if the transaction is not read-write, if required.
|
static void |
flush()
Deprecated.
No longer does anything
|
static AlfrescoTransactionSupport.TxnReadState |
getTransactionReadState() |
static boolean |
isDirty()
Deprecated.
To be replaced by
DirtySessionMethodInterceptor |
public static final int SESSION_SYNCHRONIZATION_ORDER
public static AlfrescoTransactionSupport.TxnReadState getTransactionReadState()
public static void checkTransactionReadState(boolean requireReadWrite)
requireReadWrite
- true if the transaction must be read-writepublic static boolean isDirty()
DirtySessionMethodInterceptor
public static void bindDaoService(TransactionalDao daoService)
This method can be called repeatedly as long as the service being bound implements equals and hashCode.
daoService
- TransactionalDaopublic static void bindIntegrityChecker(IntegrityChecker integrityChecker)
This method can be called repeatedly as long as the service being bound implements equals and hashCode.
integrityChecker
- IntegrityCheckerpublic static void bindLucene(LuceneIndexerAndSearcher indexerAndSearcher)
Setting this will ensure that the pre- and post-commit operations perform the necessary cleanups against the LuceneIndexerAndSearcherFactory.
Although bound within a Set, it would still be better for the caller to only bind once per transaction, if possible.
indexerAndSearcher
- the Lucene indexer to perform transaction completion
tasks onpublic static void bindListener(TransactionListener listener)
TransactionSupportUtil
,
bindListener(org.alfresco.util.transaction.TransactionListener)
public static void bindListener(org.alfresco.util.transaction.TransactionListener listener)
will be better for the caller to only bind once per transaction, if possible.
listener
- the transaction listener
tasks onpublic static void flush()
Copyright © 2005–2017 Alfresco Software. All rights reserved.