Oracle Fusion Middleware
Oracle WebLogic Server API Reference
12c Release 1 (12.1.1)

Part Number E24391-02

weblogic.wsee.wstx.wsat
Class WSATXAResource

java.lang.Object
  extended by weblogic.wsee.wstx.wsat.WSATXAResource
All Implemented Interfaces:
Serializable, XAResource, WSATConstants

public class WSATXAResource
extends Object
implements WSATConstants, XAResource, Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface weblogic.wsee.wstx.wsat.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, 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
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Constructor Summary
WSATXAResource(EndpointReference epr, Xid xid)
          Constructor used for runtime
WSATXAResource(Transactional.Version version, EndpointReference epr, Xid xid)
          Constructor used for runtime
WSATXAResource(Transactional.Version version, EndpointReference epr, Xid xid, boolean isRecovery)
          Constructor used for recovery
 
Method Summary
 void commit(Xid xid, boolean onePhase)
          Commit.
 void end(Xid xid, int i)
          Not applicable to WS-AT
 boolean equals(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(Xid xid)
          Not applicable to WS-AT
 int getTransactionTimeout()
          Not applicable to WS-AT
 Xid getXid()
          Returns Xid for use in equality, as key in durable participant map, and from gateway registerWSATResource of subordinate/participant.
 boolean isSameRM(XAResource xaResource)
          Not applicable to WS-AT
 int prepare(Xid xid)
           
 Xid[] recover(int i)
          Not applicable to WS-AT
 void rollback(Xid xid)
           
 void setBranchQualifier(byte[] bqual)
          Called from Registration to set branch qualifier that was generated during enlist
 void setStatus(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(Xid xid, int i)
          Not applicable to WS-AT
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WSATXAResource

public WSATXAResource(EndpointReference epr,
                      Xid xid)
Constructor used for runtime

Parameters:
epr - SEndpointReference participant endpoint reference
xid - Xid of transaction

WSATXAResource

public WSATXAResource(Transactional.Version version,
                      EndpointReference epr,
                      Xid xid)
Constructor used for runtime

Parameters:
version - Transactional.Version
epr - EndpointReference participant endpoint reference
xid - Xid of transaction

WSATXAResource

public WSATXAResource(Transactional.Version version,
                      EndpointReference epr,
                      Xid xid,
                      boolean isRecovery)
Constructor used for recovery

Parameters:
version - Transactional.Version
epr - EndpointReference participant endpoint reference
xid - Xid of transaction
isRecovery - 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:
prepare in interface XAResource
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 Throwable
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

Overrides:
finalize in class Object
Throws:
Throwable - he Exception raised by this method

commit

public void commit(Xid xid,
                   boolean onePhase)
            throws XAException
Commit.

Specified by:
commit in interface XAResource
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 used
onePhase - 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:
rollback in interface XAResource
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:
forget in interface XAResource
Parameters:
xid - Xid
Throws:
XAException

setTransactionTimeout

public boolean setTransactionTimeout(int i)
                              throws XAException
Not applicable to WS-AT

Specified by:
setTransactionTimeout in interface XAResource
Parameters:
i - timeout
Returns:
boolean
Throws:
XAException

start

public void start(Xid xid,
                  int i)
           throws XAException
Not applicable to WS-AT

Specified by:
start in interface XAResource
Parameters:
xid - Xid
i - flag
Throws:
XAException

end

public void end(Xid xid,
                int i)
         throws XAException
Not applicable to WS-AT

Specified by:
end in interface XAResource
Parameters:
xid - Xid
i - flag
Throws:
XAException - xaexception

getTransactionTimeout

public int getTransactionTimeout()
                          throws XAException
Not applicable to WS-AT

Specified by:
getTransactionTimeout in interface XAResource
Returns:
int timeout
Throws:
XAException

isSameRM

public boolean isSameRM(XAResource xaResource)
                 throws XAException
Not applicable to WS-AT

Specified by:
isSameRM in interface XAResource
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:
recover in interface XAResource
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[]

equals

public boolean equals(Object obj)
Equality check based on instanceof and Xid that identifies this Synchronization

Overrides:
equals in class Object
Parameters:
obj - Object to conduct equality check against
Returns:
if equal

toString

public String toString()
Overrides:
toString in class Object

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
12c Release 1 (12.1.1)

Part Number E24391-02