public abstract class AbstractXAResourceHolder extends AbstractXAStatefulHolder implements XAResourceHolder
XAResourceHolder. This class keeps a list of all
XAResourceHolderStates of the XAResourceHolder plus the currently active one. There is
one per transaction in which this XAResourceHolder is enlisted plus all the suspended transactions in which
it is enlisted as well.STATE_ACCESSIBLE, STATE_CLOSED, STATE_IN_POOL, STATE_NOT_ACCESSIBLE| Constructor and Description |
|---|
AbstractXAResourceHolder() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getXAResourceHolderStateGtrids()
Simple helper method which returns a set of GTRIDs of transactions in which
this resource is enlisted.
|
java.util.Map<Uid,XAResourceHolderState> |
getXAResourceHolderStatesForGtrid(Uid gtrid)
Get all the
XAResourceHolderStates of this wrapped resource for a specific GTRID. |
boolean |
hasStateForXAResource(XAResourceHolder xaResourceHolder)
Check if this
XAResourceHolder contains a state for a specific XAResourceHolder. |
boolean |
isParticipatingInActiveGlobalTransaction()
If this method returns false, then local transaction calls like Connection.commit() can be made.
|
void |
putXAResourceHolderState(BitronixXid xid,
XAResourceHolderState xaResourceHolderState)
Add a
XAResourceHolderState of this wrapped resource. |
void |
removeXAResourceHolderState(BitronixXid xid)
Remove all states related to a specific Xid from this wrapped resource.
|
addStateChangeEventListener, getState, removeStateChangeEventListener, setStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetResourceBean, getXAResourceaddStateChangeEventListener, close, getConnectionHandle, getLastReleaseDate, getState, getXAResourceHolders, removeStateChangeEventListener, setStatepublic java.util.Map<Uid,XAResourceHolderState> getXAResourceHolderStatesForGtrid(Uid gtrid)
XAResourceHolderXAResourceHolderStates 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.
getXAResourceHolderStatesForGtrid in interface XAResourceHoldergtrid - the GTRID of the transaction state to add.XAResourceHolderState.public void putXAResourceHolderState(BitronixXid xid, XAResourceHolderState xaResourceHolderState)
XAResourceHolderXAResourceHolderState of this wrapped resource.putXAResourceHolderState in interface XAResourceHolderxid - the Xid of the transaction state to add.xaResourceHolderState - the XAResourceHolderState to set.public void removeXAResourceHolderState(BitronixXid xid)
XAResourceHolderremoveXAResourceHolderState in interface XAResourceHolderxid - the Xid of the transaction state to remove.public boolean hasStateForXAResource(XAResourceHolder xaResourceHolder)
XAResourceHolderXAResourceHolder contains a state for a specific XAResourceHolder.
In other words: has the XAResourceHolder's XAResource been enlisted in some transaction ?hasStateForXAResource in interface XAResourceHolderxaResourceHolder - the XAResourceHolder to look for.XAResourceHolder is enlisted in some transaction, false otherwise.public boolean isParticipatingInActiveGlobalTransaction()
public java.util.Set<java.lang.String> getXAResourceHolderStateGtrids()
Copyright © 2006-2021 Bitronix Software. All Rights Reserved.