Interface EhcacheXAResource

  • All Superinterfaces:
    javax.transaction.xa.XAResource
    All Known Implementing Classes:
    EhcacheXAResourceImpl

    public interface EhcacheXAResource
    extends javax.transaction.xa.XAResource
    EhcacheXAResource represents an Ehcache instance.
    Author:
    Nabib El-Rahman, Alex Snaps
    • Method Detail

      • addTwoPcExecutionListener

        void addTwoPcExecutionListener​(XAExecutionListener listener)
        Add a listener which will be called back according to the 2PC lifecycle
        Parameters:
        listener - the XAExecutionListener
      • getCacheName

        java.lang.String getCacheName()
        Getter to the name of the cache wrapped by this XAResource
        Returns:
        Ehcache.getName() value
      • createTransactionContext

        XATransactionContext createTransactionContext()
                                               throws javax.transaction.SystemException,
                                                      javax.transaction.RollbackException
        Obtain the already associated XATransactionContext with the current Transaction, or create a new one should none be there yet.
        Returns:
        The associated Transaction associated XATransactionContext
        Throws:
        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.