class DRDAXAProtocol
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
private DRDAConnThread |
connThread |
|
private DDMReader |
reader |
|
private DDMWriter |
writer |
|
private javax.transaction.xa.Xid |
xid |
Holds the Xid of the global transaction associated with
the corresponding DRDAConnThread (and connection itself).
|
| Constructor | Description |
|---|---|
DRDAXAProtocol(DRDAConnThread connThread) |
| Modifier and Type | Method | Description |
|---|---|---|
private void |
commitLocalTransaction() |
Commit local transaction.
|
private void |
commitTransaction(javax.transaction.xa.Xid xid,
int xaflags) |
Commit the xa transaction.
|
private void |
commitXATransaction(javax.transaction.xa.Xid xid,
int xaflags) |
Commit the xa transaction.
|
private void |
endXA(javax.transaction.xa.Xid xid,
int xaflags) |
End the xa transaction.
|
private void |
forgetXATransaction(javax.transaction.xa.Xid xid) |
Forget the xa transaction.
|
(package private) ResourceAdapter |
getResourceAdapter() |
|
private javax.transaction.xa.XAResource |
getXAResource() |
get XAResource for the connection
|
protected void |
parseSYNCCTL() |
Parse SYNCCTL - Parse SYNCCTL command for XAMGR lvl 7
|
protected int |
parseSYNCTYPE() |
parse SYNCTYPE for XAMGR lvl 7
return synctype value
CodePoint.SYNCTYPE_NEW_UOW -> XAResource.start()
CodePoint.SYNCTYPE_END_UOW -> XAResource.end()
CodePoint.SYNCTYPE_PREPARE -> XAResource.prepare()
CodePoint.SYNCTYPE_MIGRATE -> not supported //SYNCPT MGR LEVEL 5
CodePoint.SYNCTYPE_REQ_COMMIT -> not supported //SYNCPT MGR LEVEL 5
CodePoint.SYNCTYPE_COMMITTED -> XAResource.commit()
or local commit for null XID
CodePoint.SYNCTYPE_REQ_LOG -> not supported
CodePoint.SYNCTYPE_REQ_FORGET -> XAResource.forget()
CodePoint.SYNCTYPE_ROLLBACK -> XAResource.rollback()
CodePoint.SYNCTYPE_MIGRATED -> not supported
CodePoint.SYNCTYPE_INDOUBT -> XAResource.recover();
|
private int |
parseXAFlags() |
parse XAFlags
|
private long |
parseXATimeout() |
Parses a XA transaction timout value.
|
private javax.transaction.xa.Xid |
parseXID() |
Parse XID
formatId -1 translates into a null XID and a local transaction
|
private void |
prepareXATransaction(javax.transaction.xa.Xid xid) |
Prepare the xa transaction.
|
private int |
processXAException(javax.transaction.xa.XAException xe) |
return xa exception errorCode.
|
private void |
recoverXA() |
|
private void |
recoverXA(int xaflags) |
Call recover.
|
(package private) void |
rollbackCurrentTransaction() |
This function rollbacks the current global transaction associated
with the XAResource or a local transaction.
|
private void |
rollbackLocalTransaction(boolean sendSYNCCRD) |
Rollback a local transaction.
|
private void |
rollbackTransaction(javax.transaction.xa.Xid xid,
boolean sendSYNCCRD) |
Rollback transaction.
|
private void |
rollbackXATransaction(javax.transaction.xa.Xid xid,
boolean sendSYNCCRD) |
Rollback the xa transaction.
|
private void |
startXATransaction(javax.transaction.xa.Xid xid,
int xaflags,
long xaTimeout) |
Start the xa transaction.
|
private java.lang.String |
syncTypeToString(int syncType) |
printable syncType for debug output
|
private void |
writePRPHRCLST(javax.transaction.xa.Xid[] xids) |
write PRPHRCLST (indoubt list)
|
private void |
writeSYNCCRD(int synctype,
int xaRetVal,
javax.transaction.xa.Xid[] xids) |
Write SYNCCRD (SYNCCTL response)
|
private void |
writeXID(javax.transaction.xa.Xid xid) |
write XID
|
private java.lang.String |
xaflagsToString(int xaflags) |
printable xaflags
|
private DRDAConnThread connThread
private DDMReader reader
private DDMWriter writer
private javax.transaction.xa.Xid xid
DRDAXAProtocol(DRDAConnThread connThread)
protected void parseSYNCCTL()
throws DRDAProtocolException
DRDAProtocolExceptionprotected int parseSYNCTYPE()
throws DRDAProtocolException
DRDAProtocolExceptionprivate javax.transaction.xa.Xid parseXID()
throws DRDAProtocolException
DRDAProtocolExceptionprivate int parseXAFlags()
throws DRDAProtocolException
DRDAProtocolExceptionprivate long parseXATimeout()
throws DRDAProtocolException
DRDAProtocolExceptionprivate void startXATransaction(javax.transaction.xa.Xid xid,
int xaflags,
long xaTimeout)
throws DRDAProtocolException
xid - - XID (formatId = -1 for local transaction)xaflags - - xaflagsxaTimeout - - The timeout for the global transaction in millis
(or -1 if not specified)DRDAProtocolExceptionprivate void commitTransaction(javax.transaction.xa.Xid xid,
int xaflags)
throws DRDAProtocolException
xid - - XID (formatId = -1 for local transaction)xaflags - - xaflagsDRDAProtocolExceptionprivate void commitLocalTransaction()
throws DRDAProtocolException
DRDAProtocolExceptionprivate void commitXATransaction(javax.transaction.xa.Xid xid,
int xaflags)
throws DRDAProtocolException
xid - - XIDxaflags - - xaflagsDRDAProtocolExceptionprivate void rollbackTransaction(javax.transaction.xa.Xid xid,
boolean sendSYNCCRD)
throws DRDAProtocolException
xid - Xid for rollback for global transaction.
If xid formatid is -1 it represents a local transactionsendSYNCCRD - Indicates whether the function should
send a SYNCCRD responseDRDAProtocolExceptionprivate void rollbackLocalTransaction(boolean sendSYNCCRD)
throws DRDAProtocolException
sendSYNCCRD - Indicates whether the function should
send a SYNCCRD responseDRDAProtocolExceptionprivate void rollbackXATransaction(javax.transaction.xa.Xid xid,
boolean sendSYNCCRD)
throws DRDAProtocolException
xid - - XIDsendSYNCCRD - Indicates whether the function should
send a SYNCCRD responseDRDAProtocolExceptionprivate void endXA(javax.transaction.xa.Xid xid,
int xaflags)
throws DRDAProtocolException
xid - - XIDxaflags - - xaflagsDRDAProtocolExceptionprivate void prepareXATransaction(javax.transaction.xa.Xid xid)
throws DRDAProtocolException
xid - - XIDDRDAProtocolExceptionprivate void forgetXATransaction(javax.transaction.xa.Xid xid)
throws DRDAProtocolException
xid - - XIDDRDAProtocolExceptionprivate void recoverXA()
throws DRDAProtocolException
DRDAProtocolExceptionprivate void recoverXA(int xaflags)
throws DRDAProtocolException
DRDAProtocolExceptionprivate void writeSYNCCRD(int synctype,
int xaRetVal,
javax.transaction.xa.Xid[] xids)
throws DRDAProtocolException
synctype - - XA Command to send response for see parseSYNCTYPExaRetVal - - return value from XA commandxids - - list of xids to return for recover.
null for other commandsDRDAProtocolExceptionprivate void writePRPHRCLST(javax.transaction.xa.Xid[] xids)
throws DRDAProtocolException
xids - - list of indoubt xa transactions obtained from recoverDRDAProtocolExceptionprivate void writeXID(javax.transaction.xa.Xid xid)
throws DRDAProtocolException
xid - - XID to writeDRDAProtocolExceptionprivate javax.transaction.xa.XAResource getXAResource()
private java.lang.String syncTypeToString(int syncType)
syncType - private java.lang.String xaflagsToString(int xaflags)
xaflags - private int processXAException(javax.transaction.xa.XAException xe)
xe - - XA ExceptionResourceAdapter getResourceAdapter()
void rollbackCurrentTransaction()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.