public class WSATXAResource extends java.lang.Object implements WSATConstants, javax.transaction.xa.XAResource, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
ACTIVE |
private javax.xml.ws.EndpointReference |
m_epr |
private boolean |
m_isRemovedFromMap |
private java.lang.String |
m_status |
private Transactional.Version |
m_version |
private javax.transaction.xa.Xid |
m_xid |
(package private) static long |
serialVersionUID |
ABORTED, ACTION, ADDRESS, BRANCHQUAL, BRANCHQUAL_QNAME, COMMIT, COMMITTED, COORDINATION_CONTEXT, COORDINATION_TYPE, COORDINATOR_PROTOCOL_SERVICE, CURRENT_WSCOOR, DEBUG_WSAT, DURABLE_2PC, EXPIRES, FAULT_TO, FROM, HTTP_SCHEMAS_XMLSOAP_ORG_WS_2004_10_WSAT, HTTP_SCHEMAS_XMLSOAP_ORG_WS_2004_10_WSAT_DURABLE_2PC, HTTP_SCHEMAS_XMLSOAP_ORG_WS_2004_10_WSAT_VOLATILE_2PC, IDENTIFIER, MESSAGE_ID, MUST_UNDERSTAND, PARTICIPANT_PROTOCOL_SERVICE, PREPARE, PREPARED, PROTOCOL_IDENTIFIER, READONLY, REFERENCE_PARAMETERS, REGISTER, REGISTER_RESPONSE, REGISTRATION_SERVICE, REPLAY, REPLY_TO, ROLLBACK, ROUTING, ROUTING_QNAME, SOAP_ENVELOPE, TO, TXID, TXID_QNAME, TXPROP_WSAT_FOREIGN_RECOVERY_CONTEXT, VOLATILE_2PC, WLA_WSAT_NS_URI, WLS_WSAT, WSA, WSADDRESSING_NS_URI, WSAT, WSAT_COORDINATORPORTTYPEPORT, WSAT_PARTICIPANTPORTTYPEPORT, WSAT_REGISTRATIONCOORDINATORPORTTYPEPORT, WSAT_REGISTRATIONREQUESTERPORTTYPEPORT, WSAT10_NS_URI, WSAT11_COORDINATORPORTTYPEPORT, WSAT11_DURABLE_2PC, WSAT11_NS_URI, WSAT11_PARTICIPANTPORTTYPEPORT, WSAT11_REGISTRATIONCOORDINATORPORTTYPEPORT, WSAT11_REGISTRATIONREQUESTERPORTTYPEPORT, WSAT11_VOLATILE_2PC, WSCOOR, WSCOOR_CONTEXT_QNAME, WSCOOR_REGISTER_QNAME, WSCOOR10_NS_URI, WSCOOR11_CONTEXT_QNAME, WSCOOR11_NS_URI, WSCOOR11_REGISTER_QNAME
Constructor and Description |
---|
WSATXAResource(javax.xml.ws.EndpointReference epr,
javax.transaction.xa.Xid xid)
Constructor used for runtime
|
WSATXAResource(Transactional.Version version,
javax.xml.ws.EndpointReference epr,
javax.transaction.xa.Xid xid)
Constructor used for runtime
|
WSATXAResource(Transactional.Version version,
javax.xml.ws.EndpointReference epr,
javax.transaction.xa.Xid xid,
boolean isRecovery)
Constructor used for recovery
|
Modifier and Type | Method and Description |
---|---|
void |
commit(javax.transaction.xa.Xid xid,
boolean onePhase)
Commit.
|
void |
end(javax.transaction.xa.Xid xid,
int i)
Not applicable to WS-AT
|
boolean |
equals(java.lang.Object obj)
Equality check based on instanceof and Xid that identifies this Synchronization
|
protected void |
finalize()
Prevents leaks in the event of protocol exceptions, abandonments, etc.
|
void |
forget(javax.transaction.xa.Xid xid)
Not applicable to WS-AT
|
int |
getTransactionTimeout()
Not applicable to WS-AT
|
(package private) int |
getWaitForReplyTimeout()
Returns the amount of time to wait for replies to prepare, commit, and rollback calls
|
(package private) WSATHelper |
getWSATHelper() |
javax.transaction.xa.Xid |
getXid()
Returns Xid for use in equality, as key in durable participant map, and from gateway registerWSATResource of
subordinate/participant.
|
int |
hashCode() |
boolean |
isSameRM(javax.transaction.xa.XAResource xaResource)
Not applicable to WS-AT
|
private void |
log(java.lang.String message) |
private void |
logSuccess(java.lang.String method) |
private javax.transaction.xa.XAException |
newFailedStateXAExceptionForMethodNameAndErrorcode(java.lang.String method,
int errorcode) |
int |
prepare(javax.transaction.xa.Xid xid) |
private void |
readObject(java.io.ObjectInputStream ois) |
javax.transaction.xa.Xid[] |
recover(int i)
Not applicable to WS-AT
|
void |
rollback(javax.transaction.xa.Xid xid) |
void |
setBranchQualifier(byte[] bqual)
Called from Registration to set branch qualifier that was generated during enlist
|
void |
setStatus(java.lang.String status)
Called by Coordinator service in reaction to completion operation call in order to setStatus accordingly
|
boolean |
setTransactionTimeout(int i)
Not applicable to WS-AT
|
void |
start(javax.transaction.xa.Xid xid,
int i)
Not applicable to WS-AT
|
java.lang.String |
toString() |
private void |
writeObject(java.io.ObjectOutputStream oos) |
static final long serialVersionUID
private javax.transaction.xa.Xid m_xid
static final java.lang.String ACTIVE
private volatile java.lang.String m_status
private Transactional.Version m_version
private boolean m_isRemovedFromMap
private transient javax.xml.ws.EndpointReference m_epr
public WSATXAResource(javax.xml.ws.EndpointReference epr, javax.transaction.xa.Xid xid)
epr
- SEndpointReference participant endpoint referencexid
- Xid of transactionpublic WSATXAResource(Transactional.Version version, javax.xml.ws.EndpointReference epr, javax.transaction.xa.Xid xid)
version
- Transactional.Versionepr
- EndpointReference participant endpoint referencexid
- Xid of transactionpublic WSATXAResource(Transactional.Version version, javax.xml.ws.EndpointReference epr, javax.transaction.xa.Xid xid, boolean isRecovery)
version
- Transactional.Versionepr
- EndpointReference participant endpoint referencexid
- Xid of transactionisRecovery
- true if for recovery, false if not (ie if for runtime)WSATHelper getWSATHelper()
public void setStatus(java.lang.String status)
status
- String status as found in WSATConstants.public int prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
prepare
in interface javax.transaction.xa.XAResource
xid
- Xid The actual Xid passed in is ignored and the member variable used instead as the value passed in
as there is a final 1-to-1 relationship between WSATXAResource and Xid. In reality is doesn't matter but in
order to be consistent with rollback (where it does matter), the member variable is usedjavax.transaction.xa.XAException
- xaExceptionprivate javax.transaction.xa.XAException newFailedStateXAExceptionForMethodNameAndErrorcode(java.lang.String method, int errorcode)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- he Exception
raised by this methodpublic void commit(javax.transaction.xa.Xid xid, boolean onePhase) throws javax.transaction.xa.XAException
commit
in interface javax.transaction.xa.XAResource
xid
- Xid The actual Xid passed in is ignored and the member variable used instead as there is a final
1-to-1 relationship between WSATXAResource and Xid during construction. In reality is doesn't matter but in
order to be consistent with rollback (where it does matter), the member variable is usedonePhase
- there is no single phase commit in WS-AT and so this is ignoredjavax.transaction.xa.XAException
- xaExceptionint getWaitForReplyTimeout()
public void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
rollback
in interface javax.transaction.xa.XAResource
xid
- Xid The actual Xid passed in is ignored and the member variable used instead as the value passed in
will be null for bottom-up recovery and because there is a final 1-to-1 relationship between WSATXAResource and Xid.javax.transaction.xa.XAException
public void forget(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
forget
in interface javax.transaction.xa.XAResource
xid
- Xidjavax.transaction.xa.XAException
public boolean setTransactionTimeout(int i) throws javax.transaction.xa.XAException
setTransactionTimeout
in interface javax.transaction.xa.XAResource
i
- timeoutjavax.transaction.xa.XAException
public void start(javax.transaction.xa.Xid xid, int i) throws javax.transaction.xa.XAException
start
in interface javax.transaction.xa.XAResource
xid
- Xidi
- flagjavax.transaction.xa.XAException
public void end(javax.transaction.xa.Xid xid, int i) throws javax.transaction.xa.XAException
end
in interface javax.transaction.xa.XAResource
xid
- Xidi
- flagjavax.transaction.xa.XAException
- xaexceptionpublic int getTransactionTimeout() throws javax.transaction.xa.XAException
getTransactionTimeout
in interface javax.transaction.xa.XAResource
javax.transaction.xa.XAException
public boolean isSameRM(javax.transaction.xa.XAResource xaResource) throws javax.transaction.xa.XAException
isSameRM
in interface javax.transaction.xa.XAResource
xaResource
- XAResourcejavax.transaction.xa.XAException
- xaexeceptionpublic javax.transaction.xa.Xid[] recover(int i) throws javax.transaction.xa.XAException
recover
in interface javax.transaction.xa.XAResource
i
- flagjavax.transaction.xa.XAException
- xaexceptionpublic javax.transaction.xa.Xid getXid()
public void setBranchQualifier(byte[] bqual)
bqual
- byte[]public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- Object to conduct equality check againstpublic int hashCode()
hashCode
in class java.lang.Object
private void writeObject(java.io.ObjectOutputStream oos) throws java.io.IOException
java.io.IOException
private void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
private void log(java.lang.String message)
private void logSuccess(java.lang.String method)
public java.lang.String toString()
toString
in class java.lang.Object