com.sun.xml.ws.tx.at
Class ATParticipant

java.lang.Object
  extended by com.sun.xml.ws.tx.coordinator.Registrant
      extended by com.sun.xml.ws.tx.at.ATParticipant

public class ATParticipant
extends Registrant

This class encapsulates a WS-AT participant.

A participant represents one of the three ws-at protocols: completion, volatile 2PC or durable 2PC.

Participant lifecycle consist of generating a endpoint reference

Transaction timeout from Participants perspective. Coordination Context expires specifies the period, measured from the point in time at which the context was first created or received, after which a transaction MAY be terminated solely due to its length of operation. A 2PC participant MAY elect to abort its work in the transaction so long as it has not already decided to prepare.

Since:
1.0

Nested Class Summary
static class ATParticipant.STATE
           
 
Field Summary
static java.net.URI LOCAL_PPS_URI
           
protected  ATParticipant.STATE state
           
protected  javax.transaction.xa.Xid xid
           
 
Fields inherited from class com.sun.xml.ws.tx.coordinator.Registrant
outstandingRegistrants
 
Constructor Summary
ATParticipant(Coordinator parent, Participant participant)
          Register will figure out if participant will register with local or remote Coordination Protocol Service.
ATParticipant(Coordinator parent, RegisterType registerRequest)
          Remote ATParticipant with a local Coordinator.
 
Method Summary
 void abort()
           
 void commit()
           
 void forget()
          A participant is forgotten after it has sent committed or aborted to coordinator.
 ATCoordinator getATCoordinator()
           
static CoordinatorPortType getATCoordinatorWS(javax.xml.ws.EndpointReference toCPS, javax.xml.ws.EndpointReference replyToPPS, boolean nonterminalNotify)
           
static ParticipantPortType getATParticipantWS(javax.xml.ws.EndpointReference toPPS, javax.xml.ws.EndpointReference replyToCPS, boolean nonterminalNotification)
           
 javax.xml.ws.EndpointReference getLocalParticipantProtocolService()
          No need to export an external stateful web service for this usage case.
static javax.xml.ws.EndpointReference getLocalParticipantProtocolServiceEPR()
           
 ParticipantPortType getParticipantPort(javax.xml.ws.EndpointReference epr)
           
 ATParticipant.STATE getState()
          Return participant's state for Atomic Transaction 2PC Protocol.
protected  javax.transaction.xa.Xid getXid()
           
 boolean isDurable()
           
 boolean isVolatile()
           
 void prepare()
          Returns participant state.
 void setCoordinatorProtocolService(javax.xml.ws.EndpointReference cps)
          Set the coordinator protocol service received by coor:registerResponse.
 
Methods inherited from class com.sun.xml.ws.tx.coordinator.Registrant
getCoordinator, getCoordinatorProtocolService, getId, getIdValue, getOutstandingRegistrant, getParticipantProtocolService, getProtocol, getRegisterRequest, isRegistrationCompleted, isRemoteCPS, register, removeOutstandingRegistrant, setParticpantProtocolService, setRegistrationCompleted, setRemoteCPS, waitForRegistrationResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCAL_PPS_URI

public static final java.net.URI LOCAL_PPS_URI

state

protected ATParticipant.STATE state

xid

protected javax.transaction.xa.Xid xid
Constructor Detail

ATParticipant

public ATParticipant(Coordinator parent,
                     Participant participant)
Register will figure out if participant will register with local or remote Coordination Protocol Service.


ATParticipant

public ATParticipant(Coordinator parent,
                     RegisterType registerRequest)
Remote ATParticipant with a local Coordinator. ParticipantProtocolService received as part of registerRequest.

Method Detail

getParticipantPort

public ParticipantPortType getParticipantPort(javax.xml.ws.EndpointReference epr)

isVolatile

public boolean isVolatile()

isDurable

public boolean isDurable()

forget

public void forget()
A participant is forgotten after it has sent committed or aborted to coordinator.

Specified by:
forget in class Registrant

getATCoordinatorWS

public static CoordinatorPortType getATCoordinatorWS(javax.xml.ws.EndpointReference toCPS,
                                                     javax.xml.ws.EndpointReference replyToPPS,
                                                     boolean nonterminalNotify)

getATParticipantWS

public static ParticipantPortType getATParticipantWS(javax.xml.ws.EndpointReference toPPS,
                                                     javax.xml.ws.EndpointReference replyToCPS,
                                                     boolean nonterminalNotification)

getATCoordinator

public ATCoordinator getATCoordinator()

getState

public ATParticipant.STATE getState()
Return participant's state for Atomic Transaction 2PC Protocol.


getXid

protected javax.transaction.xa.Xid getXid()

prepare

public void prepare()
             throws TXException
Returns participant state. or (something for abort).

Throws:
TXException

commit

public void commit()
            throws TXException
Throws:
TXException

abort

public void abort()

setCoordinatorProtocolService

public void setCoordinatorProtocolService(javax.xml.ws.EndpointReference cps)
Description copied from class: Registrant
Set the coordinator protocol service received by coor:registerResponse.

Overrides:
setCoordinatorProtocolService in class Registrant
Parameters:
cps - cps epr

getLocalParticipantProtocolService

public javax.xml.ws.EndpointReference getLocalParticipantProtocolService()
No need to export an external stateful web service for this usage case.

Specified by:
getLocalParticipantProtocolService in class Registrant

getLocalParticipantProtocolServiceEPR

public static javax.xml.ws.EndpointReference getLocalParticipantProtocolServiceEPR()