public abstract class TransactionSupportUtil extends Object
TransactionSynchronization
instances
are registered on behalf of the application code.Constructor and Description |
---|
TransactionSupportUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
bindListener(TransactionListener listener,
int priority)
Bind listener to the specified priority.
|
static void |
bindResource(Object key,
Object resource)
Binds a resource to the current transaction
|
static Set<TransactionListener> |
getListeners() |
static <R> R |
getResource(Object key)
Gets a resource associated with the current transaction
|
static String |
getTransactionId()
Get a unique identifier associated with each transaction of each thread.
|
static long |
getTransactionStartTime() |
static boolean |
isActualTransactionActive() |
static void |
unbindResource(Object key)
Unbinds a resource from the current transaction, which must be active.
|
public static long getTransactionStartTime()
public static String getTransactionId()
public static boolean isActualTransactionActive()
public static <R> R getResource(Object key)
key
- the thread resource map keypublic static void bindResource(Object key, Object resource)
All necessary synchronization instances will be registered automatically, if required.
key
- Objectresource
- Objectpublic static void unbindResource(Object key)
key
- Objectpublic static boolean bindListener(TransactionListener listener, int priority)
listener
- the listener to bind.priority
- 0 = Normal prioritypublic static Set<TransactionListener> getListeners()
Copyright © 2005–2018 Alfresco Software. All rights reserved.