java.lang.Object
com.sun.xml.ws.tx.at.WSATXAResource
- All Implemented Interfaces:
WSATConstants,Serializable,XAResource
- See Also:
-
Field Summary
Fields inherited from interface com.sun.xml.ws.tx.at.WSATConstants
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, WSA, WSADDRESSING_NS_URI, WSAT, WSAT_CONTEXT_ROOT, WSAT_COORDINATORPORTTYPEPORT, WSAT_PARTICIPANTPORTTYPEPORT, WSAT_REGISTRATIONCOORDINATORPORTTYPEPORT, WSAT_REGISTRATIONREQUESTERPORTTYPEPORT, WSAT_TRANSACTION, WSAT_TRANSACTION_XID, WSAT_WSAT, 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_QNAMEFields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY -
Constructor Summary
ConstructorsConstructorDescriptionWSATXAResource(Transactional.Version version, jakarta.xml.ws.EndpointReference epr, Xid xid) Constructor used for runtimeWSATXAResource(Transactional.Version version, jakarta.xml.ws.EndpointReference epr, Xid xid, boolean isRecovery) Constructor used for recoveryWSATXAResource(jakarta.xml.ws.EndpointReference epr, Xid xid) Constructor used for runtime -
Method Summary
Modifier and TypeMethodDescriptionvoidCommit.voidNot applicable to WS-ATbooleanEquality check based on instanceof and Xid that identifies this Synchronizationprotected voidfinalize()Prevents leaks in the event of protocol exceptions, abandonments, etc.voidNot applicable to WS-ATintNot applicable to WS-ATgetXid()Returns Xid for use in equality, as key in durable participant map, and from gateway registerWSATResource of subordinate/participant.booleanisSameRM(XAResource xaResource) Not applicable to WS-ATintXid[]recover(int i) Not applicable to WS-ATvoidvoidsetBranchQualifier(byte[] bqual) Called from Registration to set branch qualifier that was generated during enlistvoidCalled by Coordinator service in reaction to completion operation call in order to setStatus accordinglybooleansetTransactionTimeout(int i) Not applicable to WS-ATvoidvoidNot applicable to WS-ATtoString()
-
Constructor Details
-
WSATXAResource
Constructor used for runtime- Parameters:
epr- SEndpointReference participant endpoint referencexid- Xid of transaction
-
WSATXAResource
Constructor used for runtime- Parameters:
version- Transactional.Versionepr- EndpointReference participant endpoint referencexid- Xid of transaction
-
WSATXAResource
public WSATXAResource(Transactional.Version version, jakarta.xml.ws.EndpointReference epr, Xid xid, boolean isRecovery) Constructor used for recovery- Parameters:
version- Transactional.Versionepr- EndpointReference participant endpoint referencexid- Xid of transactionisRecovery- true if for recovery, false if not (ie if for runtime)
-
-
Method Details
-
setStatus
Called by Coordinator service in reaction to completion operation call in order to setStatus accordingly- Parameters:
status- String status as found in WSATConstants.
-
prepare
- Specified by:
preparein interfaceXAResource- Parameters:
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 used- Returns:
- int prepare vote
- Throws:
XAException- xaException
-
finalize
Prevents leaks in the event of protocol exceptions, abandonments, etc. This has the requirement that transactions are never recreated for recovery from scratch using in-memory records -
commit
Commit.- Specified by:
commitin interfaceXAResource- Parameters:
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 ignored- Throws:
XAException- xaException
-
rollback
- Specified by:
rollbackin interfaceXAResource- Parameters:
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.- Throws:
XAException
-
forget
Not applicable to WS-AT- Specified by:
forgetin interfaceXAResource- Parameters:
xid- Xid
-
setTransactionTimeout
public boolean setTransactionTimeout(int i) Not applicable to WS-AT- Specified by:
setTransactionTimeoutin interfaceXAResource- Parameters:
i- timeout- Returns:
- boolean
-
start
Not applicable to WS-AT- Specified by:
startin interfaceXAResource- Parameters:
xid- Xidi- flag
-
end
Not applicable to WS-AT- Specified by:
endin interfaceXAResource- Parameters:
xid- Xidi- flag
-
getTransactionTimeout
public int getTransactionTimeout()Not applicable to WS-AT- Specified by:
getTransactionTimeoutin interfaceXAResource- Returns:
- int timeout
-
isSameRM
Not applicable to WS-AT- Specified by:
isSameRMin interfaceXAResource- Parameters:
xaResource- XAResource- Returns:
- boolean must be false
-
recover
Not applicable to WS-AT- Specified by:
recoverin interfaceXAResource- Parameters:
i- flag- Returns:
- empty array
-
getXid
Returns Xid for use in equality, as key in durable participant map, and from gateway registerWSATResource of subordinate/participant.- Returns:
- Xid that identifies this XAResource
-
setBranchQualifier
public void setBranchQualifier(byte[] bqual) Called from Registration to set branch qualifier that was generated during enlist- Parameters:
bqual- byte[]
-
setXid
-
equals
Equality check based on instanceof and Xid that identifies this Synchronization -
toString
-