public interface EhcacheXAResource
extends javax.transaction.xa.XAResource
Ehcache
instance.Modifier and Type | Method and Description |
---|---|
void |
addTwoPcExecutionListener(XAExecutionListener listener)
Add a listener which will be called back according to the 2PC lifecycle
|
XATransactionContext |
createTransactionContext()
Obtain the already associated
XATransactionContext with the current Transaction,
or create a new one should none be there yet. |
java.lang.String |
getCacheName()
Getter to the name of the cache wrapped by this XAResource
|
XATransactionContext |
getCurrentTransactionContext()
Gets the current
XATransactionContext associated with this resource |
void addTwoPcExecutionListener(XAExecutionListener listener)
listener
- the XAExecutionListenerjava.lang.String getCacheName()
Ehcache.getName()
valueXATransactionContext createTransactionContext() throws javax.transaction.SystemException, javax.transaction.RollbackException
XATransactionContext
with the current Transaction,
or create a new one should none be there yet.XATransactionContext
javax.transaction.SystemException
- Thrown if the associated transaction manager encounters an unexpected error condition.javax.transaction.RollbackException
- Thrown if the resource has to be enlisted with the transaction, while it is marked for rollback only.XATransactionContext getCurrentTransactionContext()
XATransactionContext
associated with this resourceXATransactionContext
, or null if none