Interface XAResourceHolder

All Superinterfaces:
XAStatefulHolder
All Known Implementing Classes:
AbstractXAResourceHolder, DualSessionWrapper, DualSessionWrapper, EhCacheXAResourceHolder, JdbcPooledConnection, RecoveryXAResourceHolder

public interface XAResourceHolder extends XAStatefulHolder
XAResource wrappers must implement this interface. It defines a way to get access to the transactional state of this XAResourceHolder.
Author:
lorban
See Also:
  • Method Details

    • getXAResource

      XAResource getXAResource()
      Get the vendor's XAResource implementation of the wrapped resource.
      Returns:
      the vendor's XAResource implementation.
    • getXAResourceHolderStatesForGtrid

      Map<Uid,XAResourceHolderState> getXAResourceHolderStatesForGtrid(Uid gtrid)
      Get all the XAResourceHolderStates of this wrapped resource for a specific GTRID.

      The returned Map is guaranteed to return states in order they were added when its values are iterated.

      Parameters:
      gtrid - the GTRID of the transaction state to add.
      Returns:
      the XAResourceHolderState.
    • putXAResourceHolderState

      void putXAResourceHolderState(BitronixXid xid, XAResourceHolderState xaResourceHolderState)
      Add a XAResourceHolderState of this wrapped resource.
      Parameters:
      xid - the Xid of the transaction state to add.
      xaResourceHolderState - the XAResourceHolderState to set.
    • removeXAResourceHolderState

      void removeXAResourceHolderState(BitronixXid xid)
      Remove all states related to a specific Xid from this wrapped resource.
      Parameters:
      xid - the Xid of the transaction state to remove.
    • hasStateForXAResource

      boolean hasStateForXAResource(XAResourceHolder xaResourceHolder)
      Check if this XAResourceHolder contains a state for a specific XAResourceHolder. In other words: has the XAResourceHolder's XAResource been enlisted in some transaction ?
      Parameters:
      xaResourceHolder - the XAResourceHolder to look for.
      Returns:
      true if the XAResourceHolder is enlisted in some transaction, false otherwise.
    • getResourceBean

      ResourceBean getResourceBean()
      Get the ResourceBean which created this XAResourceHolder.
      Returns:
      the ResourceBean which created this XAResourceHolder.