- java.lang.Object
-
- com.sun.xml.ws.tx.at.WSATXAResource
-
- All Implemented Interfaces:
WSATConstants,Serializable,XAResource
public class WSATXAResource extends Object implements WSATConstants, XAResource, Serializable
- See Also:
- Serialized Form
-
-
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_QNAME
-
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
-
-
Constructor Summary
Constructors Constructor Description WSATXAResource(com.sun.xml.ws.api.tx.at.Transactional.Version version, jakarta.xml.ws.EndpointReference epr, Xid xid)Constructor used for runtimeWSATXAResource(com.sun.xml.ws.api.tx.at.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcommit(Xid xid, boolean onePhase)Commit.voidend(Xid xid, int i)Not applicable to WS-ATbooleanequals(Object obj)Equality check based on instanceof and Xid that identifies this Synchronizationprotected voidfinalize()Prevents leaks in the event of protocol exceptions, abandonments, etc.voidforget(Xid xid)Not applicable to WS-ATintgetTransactionTimeout()Not applicable to WS-ATXidgetXid()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-ATintprepare(Xid xid)Xid[]recover(int i)Not applicable to WS-ATvoidrollback(Xid xid)voidsetBranchQualifier(byte[] bqual)Called from Registration to set branch qualifier that was generated during enlistvoidsetStatus(String status)Called by Coordinator service in reaction to completion operation call in order to setStatus accordinglybooleansetTransactionTimeout(int i)Not applicable to WS-ATvoidsetXid(Xid xid)voidstart(Xid xid, int i)Not applicable to WS-ATStringtoString()
-
-
-
Constructor Detail
-
WSATXAResource
public WSATXAResource(jakarta.xml.ws.EndpointReference epr, Xid xid)Constructor used for runtime- Parameters:
epr- SEndpointReference participant endpoint referencexid- Xid of transaction
-
WSATXAResource
public WSATXAResource(com.sun.xml.ws.api.tx.at.Transactional.Version version, jakarta.xml.ws.EndpointReference epr, Xid xid)Constructor used for runtime- Parameters:
version- Transactional.Versionepr- EndpointReference participant endpoint referencexid- Xid of transaction
-
WSATXAResource
public WSATXAResource(com.sun.xml.ws.api.tx.at.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 Detail
-
setStatus
public void setStatus(String status)
Called by Coordinator service in reaction to completion operation call in order to setStatus accordingly- Parameters:
status- String status as found in WSATConstants.
-
prepare
public int prepare(Xid xid) throws XAException
- 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
protected void finalize() throws ThrowablePrevents 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
public void commit(Xid xid, boolean onePhase) throws XAException
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
public void rollback(Xid xid) throws XAException
- 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
public void forget(Xid xid) throws XAException
Not applicable to WS-AT- Specified by:
forgetin interfaceXAResource- Parameters:
xid- Xid- Throws:
XAException
-
setTransactionTimeout
public boolean setTransactionTimeout(int i) throws XAExceptionNot applicable to WS-AT- Specified by:
setTransactionTimeoutin interfaceXAResource- Parameters:
i- timeout- Returns:
- boolean
- Throws:
XAException
-
start
public void start(Xid xid, int i) throws XAException
Not applicable to WS-AT- Specified by:
startin interfaceXAResource- Parameters:
xid- Xidi- flag- Throws:
XAException
-
end
public void end(Xid xid, int i) throws XAException
Not applicable to WS-AT- Specified by:
endin interfaceXAResource- Parameters:
xid- Xidi- flag- Throws:
XAException- xaexception
-
getTransactionTimeout
public int getTransactionTimeout() throws XAExceptionNot applicable to WS-AT- Specified by:
getTransactionTimeoutin interfaceXAResource- Returns:
- int timeout
- Throws:
XAException
-
isSameRM
public boolean isSameRM(XAResource xaResource) throws XAException
Not applicable to WS-AT- Specified by:
isSameRMin interfaceXAResource- Parameters:
xaResource- XAResource- Returns:
- boolean must be false
- Throws:
XAException- xaexeception
-
recover
public Xid[] recover(int i) throws XAException
Not applicable to WS-AT- Specified by:
recoverin interfaceXAResource- Parameters:
i- flag- Returns:
- empty array
- Throws:
XAException- xaexception
-
getXid
public Xid 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
public void setXid(Xid xid)
-
equals
public boolean equals(Object obj)
Equality check based on instanceof and Xid that identifies this Synchronization
-
-