|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.resource.common.AbstractXAStatefulHolder
bitronix.tm.resource.common.AbstractXAResourceHolder
public abstract class AbstractXAResourceHolder
Implementation of all services required by a XAResourceHolder
. This class keeps a list of all
XAResourceHolderState
s 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.
Field Summary |
---|
Fields inherited from interface bitronix.tm.resource.common.XAStatefulHolder |
---|
STATE_ACCESSIBLE, STATE_CLOSED, STATE_IN_POOL, STATE_NOT_ACCESSIBLE |
Constructor Summary | |
---|---|
AbstractXAResourceHolder()
|
Method Summary | |
---|---|
XAResourceHolderState |
getXAResourceHolderState()
Get the XAResourceHolderState of this wrapped resource. |
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. |
boolean |
removeXAResourceHolderState(XAResourceHolderState xaResourceHolderState)
Remove the specified state from this wrapped resource. |
void |
setXAResourceHolderState(XAResourceHolderState xaResourceHolderState)
Set the XAResourceHolderState of this wrapped resource. |
Methods inherited from class bitronix.tm.resource.common.AbstractXAStatefulHolder |
---|
addStateChangeEventListener, getState, removeStateChangeEventListener, setState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bitronix.tm.resource.common.XAResourceHolder |
---|
getXAResource |
Methods inherited from interface bitronix.tm.resource.common.XAStatefulHolder |
---|
addStateChangeEventListener, close, getConnectionHandle, getLastReleaseDate, getState, getXAResourceHolders, removeStateChangeEventListener, setState |
Constructor Detail |
---|
public AbstractXAResourceHolder()
Method Detail |
---|
public XAResourceHolderState getXAResourceHolderState()
XAResourceHolder
XAResourceHolderState
of this wrapped resource.
Since a XAResourceHolder
can participate in more than one transaction at a time (when suspending a
context for instance) the transaction manager guarantees that the XAResourceHolderState
related to the
current transaction context will be returned.
getXAResourceHolderState
in interface XAResourceHolder
XAResourceHolderState
.public void setXAResourceHolderState(XAResourceHolderState xaResourceHolderState)
XAResourceHolder
XAResourceHolderState
of this wrapped resource.
setXAResourceHolderState
in interface XAResourceHolder
xaResourceHolderState
- the XAResourceHolderState
to set.public boolean removeXAResourceHolderState(XAResourceHolderState xaResourceHolderState)
XAResourceHolder
removeXAResourceHolderState
in interface XAResourceHolder
xaResourceHolderState
- the XAResourceHolderState
to remove.
public boolean hasStateForXAResource(XAResourceHolder xaResourceHolder)
XAResourceHolder
XAResourceHolder
contains a state for a specific XAResourceHolder
.
In other words: has the XAResourceHolder
's XAResource
been enlisted in some transaction ?
hasStateForXAResource
in interface XAResourceHolder
xaResourceHolder
- the XAResourceHolder
to look for.
XAResourceHolder
is enlisted in some transaction, false otherwise.public boolean isParticipatingInActiveGlobalTransaction()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |