public class XAResourceRecord extends AbstractRecord implements ExceptionDeferrer
Modifier and Type | Field and Description |
---|---|
protected XAResource |
_theXAResource |
static int |
XACONNECTION |
modifyingActions, objectModel, objectUid, usingActions
Constructor and Description |
---|
XAResourceRecord() |
XAResourceRecord(TransactionImple tx,
XAResource res,
Xid xid,
Object[] params)
The params represent specific parameters we need to recreate the
connection to the database in the event of a failure.
|
XAResourceRecord(Uid u) |
Modifier and Type | Method and Description |
---|---|
void |
alter(AbstractRecord a)
Alter the current record with the one presented.
|
boolean |
doSave()
Should this record be saved in the intentions list? If the record is
saved, then it may be recovered later in the event of a failure.
|
boolean |
forgetHeuristic()
Forget any heuristic outcome which this implementation may have produced.
|
void |
getDeferredThrowables(List<Throwable> list)
Adds all supressed throwables of this ExceptionDeferrer to the given list in order of appearance.
|
String |
getJndiName()
Returns the resource manager JNDI name for e.g.
|
String |
getProductName()
Returns the resource manager product name.
|
String |
getProductVersion()
Returns the resource manager product version.
|
Xid |
getXid() |
void |
merge(AbstractRecord a)
Merge the current record with the one presented.
|
int |
nestedAbort()
A rollback of a nested transaction has occurred.
|
int |
nestedCommit()
A commit of a nested transaction has occurred.
|
int |
nestedOnePhaseCommit()
Perform a nested one phase commit.
|
int |
nestedPrepare()
A prepare for a nested transaction has occurred.
|
protected boolean |
notAProblem(XAException ex,
boolean commit)
Is the XAException a non-error when received in reply to commit or
rollback ? It normally is, but may be overridden in recovery.
|
Uid |
order()
Return the Uid of this abstract record so that it can be ordered in the
intentions list.
|
boolean |
propagateOnCommit()
Determine if records are discarded on action commit or must be propagated
to parents.
|
protected int |
recover() |
boolean |
restore_state(InputObjectState os,
int t)
During recovery, the transaction log is given to the recovery system and
it will recreate a transaction instance to perform necessary recovery
actions.
|
boolean |
save_state(OutputObjectState os,
int t)
When the transaction is required to make the intentions list persistent,
it scans the list and asks each record whether or not it requires state
to be saved (by calling doSave).
|
void |
setJndiName(String jndiName)
Sets the resource manager JNDI name.
|
void |
setProductName(String productName)
Sets the resource manager product name.
|
void |
setProductVersion(String productVersion)
Sets the resource manager product version.
|
void |
setValue(Object o) |
boolean |
shouldAdd(AbstractRecord a)
Should we add the record presented to the intentions list?
|
boolean |
shouldAlter(AbstractRecord a)
Should we alter the current record with the one presented?
|
boolean |
shouldMerge(AbstractRecord a)
Should we merge the current record with the one presented?
|
boolean |
shouldReplace(AbstractRecord a)
Should we replace the record presented with the current record?
|
int |
topLevelAbort()
A rollback of a top-level transaction has occurred.
|
int |
topLevelCommit()
A commit of a top-level transaction has occurred.
|
int |
topLevelOnePhaseCommit()
For commit_one_phase we can do whatever we want since the transaction
outcome is whatever we want.
|
int |
topLevelPrepare()
A prepare for a top-level transaction has occurred.
|
String |
toString() |
String |
type()
Re-implementation of abstract methods inherited from base class.
|
int |
typeIs() |
static String |
typeName() |
Object |
value()
If this abstract record caused a heuristic then it should return an
object which implements
HeuristicInformation |
create, equals, getNext, getPrevious, getTypeOfObject, greaterThan, lessThan, nestedCleanup, print, propagateOnAbort, replace, setNext, setPrevious, topLevelCleanup
activate, activate, cleanup, createLists, deactivate, deactivate, deactivate, destroy, disable, forgetAction, get_uid, getMutex, getObjectModel, getStore, getStoreRoot, loadObjectState, lockMutex, modified, objectType, packHeader, persist, rememberAction, setStatus, setupStore, setupStore, setupStore, status, terminate, tryLockMutex, unlockMutex, unpackHeader
public static final int XACONNECTION
protected XAResource _theXAResource
public XAResourceRecord(TransactionImple tx, XAResource res, Xid xid, Object[] params)
public XAResourceRecord()
public XAResourceRecord(Uid u)
public final Xid getXid()
public Uid order()
AbstractRecord
order
in class AbstractRecord
Uid
for this instance.Uid
public boolean propagateOnCommit()
AbstractRecord
propagateOnCommit
in class AbstractRecord
true
if the record should be propagated to the
parent transaction if the current transaction commits,
false
otherwise. The default is true
.public int typeIs()
typeIs
in class AbstractRecord
RecordType
value.public Object value()
AbstractRecord
HeuristicInformation
value
in class AbstractRecord
Object
to be used to order.public void setValue(Object o)
setValue
in class AbstractRecord
public int nestedAbort()
AbstractRecord
nestedAbort
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int nestedCommit()
AbstractRecord
nestedCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int nestedPrepare()
AbstractRecord
nestedPrepare
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelPrepare()
AbstractRecord
topLevelPrepare
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelAbort()
AbstractRecord
topLevelAbort
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelCommit()
AbstractRecord
topLevelCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
protected boolean notAProblem(XAException ex, boolean commit)
public int nestedOnePhaseCommit()
AbstractRecord
nestedOnePhaseCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public int topLevelOnePhaseCommit()
topLevelOnePhaseCommit
in class AbstractRecord
TwoPhaseOutcome
to indicate success/failure.TwoPhaseOutcome
public boolean forgetHeuristic()
AbstractRecord
forgetHeuristic
in class AbstractRecord
true
by default. If false
is
returned then the instance must be remembered by the transaction
(in the log) in order for recovery to retry later or for a system
administrator to be able to determine which resources have not
been successfully completed.protected int recover()
public boolean save_state(OutputObjectState os, int t)
AbstractRecord
save_state
in class AbstractRecord
true
if successful, false
otherwise.public boolean restore_state(InputObjectState os, int t)
AbstractRecord
restore_state
in class AbstractRecord
true
if successful, false
otherwise.public String type()
AbstractRecord
type
in class AbstractRecord
public static String typeName()
public boolean doSave()
AbstractRecord
doSave
in class AbstractRecord
true
if it should be saved, false
otherwise. false
is the default.public void merge(AbstractRecord a)
AbstractRecord
merge
in class AbstractRecord
a
- the record with which to merge.public void alter(AbstractRecord a)
AbstractRecord
alter
in class AbstractRecord
a
- the record with which to alter.public boolean shouldAdd(AbstractRecord a)
AbstractRecord
shouldAdd
in class AbstractRecord
a
- The record to try to add.true
if the record should be added,
false
otherwise.public boolean shouldAlter(AbstractRecord a)
AbstractRecord
shouldAlter
in class AbstractRecord
a
- The record to try to alter.true
if the record should be altered,
false
otherwise.public boolean shouldMerge(AbstractRecord a)
AbstractRecord
shouldMerge
in class AbstractRecord
a
- The record to try to merge.true
if the record should be merged,
false
otherwise.public boolean shouldReplace(AbstractRecord a)
AbstractRecord
shouldReplace
in class AbstractRecord
a
- The record to try to replace.true
if the record should be replaced,
false
otherwise.public String getProductName()
public void setProductName(String productName)
productName
- the product namepublic String getProductVersion()
public void setProductVersion(String productVersion)
productVersion
- the product versionpublic String getJndiName()
public void setJndiName(String jndiName)
jndiName
- the JNDI name.public void getDeferredThrowables(List<Throwable> list)
ExceptionDeferrer
getDeferredThrowables
in interface ExceptionDeferrer
Copyright © 2021 JBoss by Red Hat. All rights reserved.