Package bitronix.tm.resource.common
Interface XAResourceHolder
- All Superinterfaces:
XAStatefulHolder
- All Known Implementing Classes:
AbstractXAResourceHolder,DualSessionWrapper,DualSessionWrapper,EhCacheXAResourceHolder,JdbcPooledConnection,RecoveryXAResourceHolder
XAResource wrappers must implement this interface. It defines a way to get access to the transactional
state of this XAResourceHolder.- Author:
- lorban
- See Also:
-
Field Summary
Fields inherited from interface bitronix.tm.resource.common.XAStatefulHolder
STATE_ACCESSIBLE, STATE_CLOSED, STATE_IN_POOL, STATE_NOT_ACCESSIBLE -
Method Summary
Modifier and TypeMethodDescriptionGet the ResourceBean which created this XAResourceHolder.Get the vendor'sXAResourceimplementation of the wrapped resource.Get all theXAResourceHolderStates of this wrapped resource for a specific GTRID.booleanhasStateForXAResource(XAResourceHolder xaResourceHolder) Check if thisXAResourceHoldercontains a state for a specificXAResourceHolder.voidputXAResourceHolderState(BitronixXid xid, XAResourceHolderState xaResourceHolderState) Add aXAResourceHolderStateof this wrapped resource.voidRemove all states related to a specific Xid from this wrapped resource.Methods inherited from interface bitronix.tm.resource.common.XAStatefulHolder
addStateChangeEventListener, close, getConnectionHandle, getLastReleaseDate, getState, getXAResourceHolders, removeStateChangeEventListener, setState
-
Method Details
-
getXAResource
XAResource getXAResource()Get the vendor'sXAResourceimplementation of the wrapped resource.- Returns:
- the vendor's XAResource implementation.
-
getXAResourceHolderStatesForGtrid
Get all theXAResourceHolderStates 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
Add aXAResourceHolderStateof this wrapped resource.- Parameters:
xid- the Xid of the transaction state to add.xaResourceHolderState- theXAResourceHolderStateto set.
-
removeXAResourceHolderState
Remove all states related to a specific Xid from this wrapped resource.- Parameters:
xid- the Xid of the transaction state to remove.
-
hasStateForXAResource
Check if thisXAResourceHoldercontains a state for a specificXAResourceHolder. In other words: has theXAResourceHolder'sXAResourcebeen enlisted in some transaction ?- Parameters:
xaResourceHolder- theXAResourceHolderto look for.- Returns:
- true if the
XAResourceHolderis enlisted in some transaction, false otherwise.
-
getResourceBean
ResourceBean getResourceBean()Get the ResourceBean which created this XAResourceHolder.- Returns:
- the ResourceBean which created this XAResourceHolder.
-