Java Doc for ATCoordinator.java in  » 6.0-JDK-Modules-com.sun » wsit » com » sun » xml » ws » tx » at » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules com.sun » wsit » com.sun.xml.ws.tx.at 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.xml.ws.tx.coordinator.Coordinator
      com.sun.xml.ws.tx.at.ATCoordinator

All known Subclasses:   com.sun.xml.ws.tx.at.ATSubCoordinator,
ATCoordinator
public class ATCoordinator extends Coordinator implements Synchronization,XAResource(Code)
Atomic Transaction Coordinator

Coordinator States: NONE, ACTIVE, Volatile2PCPrepare, Durable2PCPrepare, Committing, Aborting

Relationship between ATCoordinator and Java Transaction Manager. ATCoordinator is registered as an XAResource with Java Transaction Manager. This enables Java Transaction Manager to be root transaction manager that for ATCoordinator durable 2pc participants. ATCoordinator registers for Transaction Synchronization if it has volatile participants. This enables volatile participants to be prepared BEFORE durable 2pc participants are prepared.

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. From that point forward, the coordinator MAY elect to unilaterally roll back the transaction, so long as it has not made a commit decision.
author:
   Ryan.Shoemaker@Sun.COM
author:
   Joe.Fialli@Sun.COM
version:
   $Revision: 1.19 $
since:
   1.0


Inner Class : enum ACTION
Inner Class : enum KIND

Field Summary
final public static  URIlocalCoordinationProtocolServiceURI
    
final public static  EndpointReferencelocalCoordinatorProtocolService
    
final protected static  TransactionManagerImpltm
    
protected  Transactiontransaction
    

Constructor Summary
public  ATCoordinator(CoordinationContextInterface context, CreateCoordinationContextType request)
     Construct a new Coordinator object from the specified context and soap request.

This method is an entry point for the Activation service's createCoordinationContext operation.

public  ATCoordinator(CoordinationContextInterface context)
     Construct a new Coordinator object from the specified context.

Method Summary
public  voidaborted(String participantId)
    
public  voidaddRegistrant(Registrant registrant, WebServiceContext wsContext)
     Add the specified Registrant to the list of registrants for this coordinated activity.
public  voidafterCompletion(int i)
    
public  voidbeforeCompletion()
     Register this with TransactionSynchronizationRegistery.
public  voidcommit(Xid xid, boolean onePhase)
    
public  voidcommitted(String participantId)
    
public  voidend(Xid xid, int flags)
    
public  booleanexpirationGuard()
     Return false if it is okay to rollback the transaction.
public  voidexpire()
    
public  voidforget(Xid xid)
     forget everything about this transaction.

Recovers resources held by a transaction.

public  voidforget(ATParticipant part)
    
public  voidforget(String partId)
    
public  voidforget()
    
public  ATCompletiongetCompletionRegistrant()
     Get the completion registrant.
protected  StringgetCoordIdPartId(Registrant registrant)
    
protected  StringgetCoordIdPartId(String participantId)
    
public  EndpointReferencegetCoordinatorProtocolServiceForRegistrant(Registrant r)
    
public  Collection<ATParticipant>getDurableParticipants()
     Return a Collection of durable 2pc participants.
public  Collection<ATParticipant>getDurableParticipantsSnapshot()
    
public  EndpointReferencegetParentCoordinatorRegistrationEPR()
    
public  RegistrantgetRegistrant(String id)
     Get the registrant with the specified id or null if it does not exist.
public  List<Registrant>getRegistrants()
     Get the list of com.sun.xml.ws.tx.coordinator.Registrant s for this coordinated activity.

The returned list is unmodifiable (read-only).

public  TransactiongetTransaction()
    
public  intgetTransactionTimeout()
    
public  Collection<ATParticipant>getVolatileParticipants()
     Return a Collection of volatile 2pc participants.
public  Collection<ATParticipant>getVolatileParticipantsSnapshot()
    
public static  WSATCoordinatorgetWSATCoordinatorService()
    
public  booleanhasOutstandingParticipants()
    
public  voidinitiateCommit()
    
public  voidinitiateDurableCommit()
    
public  voidinitiateDurablePrepare()
     TODO: Each PREPARED/READONLY Volatile ATParticipant should check if it is time to start the durable 2PC phase by calling this method.
public  voidinitiateDurableRollback()
    
public  voidinitiateRollback()
    
public  voidinitiateVolatileCommit()
    
public  voidinitiateVolatilePrepare()
     Send 2PC prepare to all volatile participants

Volatile 2PC prepare constraint from 2004 WS-AT, section 3.3.1 the root coordinator begins the prepare phase of all participants registered for the Volatile 2PC protocol. All participants registered for this protocol must respond before a Prepare is issued to a participant registered for Durable 2PC.

public  voidinitiateVolatileRollback()
    
 booleanisAborting()
    
public  booleanisSameRM(XAResource xAResource)
    
public  booleanisSubordinateCoordinator()
    
public  intprepare(Xid xid)
     Synchronous prepare request invoked by JTS coordinator as part of its 2PC protocol.
public  voidprepared(String participantId)
    
public  voidprepared(String participantId, EndpointReference unknownParticipantReplyEPR)
    
public  voidreadonly(String participantId)
    
public  Xid[]recover(int i)
    
protected  booleanregisterWithDurableParent()
     Enlist with parent of ATCoordinator which is JTA transaction manager.
protected  voidregisterWithVolatileParent()
    
public  voidremoveRegistrant(String id)
    
public  voidreplay(String participantId)
     Implement inbound event replay for Atomic Transaction 2PC Protocol(Coordinator View).
public  voidresumeTransaction()
    
public  voidrollback(Xid xid)
    
 voidsetAborting()
    
public  voidsetTransaction(Transaction txn)
     Set once field.
public  booleansetTransactionTimeout(int i)
    
public  voidstart(Xid xid, int flags)
    
public  TransactionsuspendTransaction()
    
protected  voidwaitForCommitOrRollbackResponse(Protocol protocol)
    
protected  voidwaitForDurablePrepareResponse()
     Wait for all Durable participants to respond to prepare.
protected  voidwaitForVolatilePrepareResponse()
     Wait for all volatile participants to respond to prepare.

Field Detail
localCoordinationProtocolServiceURI
final public static URI localCoordinationProtocolServiceURI(Code)



localCoordinatorProtocolService
final public static EndpointReference localCoordinatorProtocolService(Code)



tm
final protected static TransactionManagerImpl tm(Code)



transaction
protected Transaction transaction(Code)




Constructor Detail
ATCoordinator
public ATCoordinator(CoordinationContextInterface context, CreateCoordinationContextType request)(Code)
Construct a new Coordinator object from the specified context and soap request.

This method is an entry point for the Activation service's createCoordinationContext operation. This entry point probably won't be used much, or not at all if we choose not to publish the operation (which is optional in the WS-Coordination spec).
Parameters:
  context - The coordination context
Parameters:
  request - The soap request




ATCoordinator
public ATCoordinator(CoordinationContextInterface context)(Code)
Construct a new Coordinator object from the specified context.

This constructor will be the main entry point for activity within the AppServer.
Parameters:
  context - The coordination context





Method Detail
aborted
public void aborted(String participantId)(Code)



addRegistrant
public void addRegistrant(Registrant registrant, WebServiceContext wsContext)(Code)
Add the specified Registrant to the list of registrants for this coordinated activity.
Parameters:
  registrant - The Registrant



afterCompletion
public void afterCompletion(int i)(Code)



beforeCompletion
public void beforeCompletion()(Code)
Register this with TransactionSynchronizationRegistery. This should get called by JTS transaction system before 2PC Participants and XAResources are prepared.



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



committed
public void committed(String participantId)(Code)



end
public void end(Xid xid, int flags) throws XAException(Code)



expirationGuard
public boolean expirationGuard()(Code)
Return false if it is okay to rollback the transaction. Do not allow transaction expiration after Phase 2 begins.



expire
public void expire()(Code)



forget
public void forget(Xid xid) throws XAException(Code)
forget everything about this transaction.

Recovers resources held by a transaction. After a transaction is committed or aborted, it is forgotten.




forget
public void forget(ATParticipant part)(Code)



forget
public void forget(String partId)(Code)



forget
public void forget()(Code)



getCompletionRegistrant
public ATCompletion getCompletionRegistrant()(Code)
Get the completion registrant. The completion registrant



getCoordIdPartId
protected String getCoordIdPartId(Registrant registrant)(Code)



getCoordIdPartId
protected String getCoordIdPartId(String participantId)(Code)



getCoordinatorProtocolServiceForRegistrant
public EndpointReference getCoordinatorProtocolServiceForRegistrant(Registrant r)(Code)



getDurableParticipants
public Collection<ATParticipant> getDurableParticipants()(Code)
Return a Collection of durable 2pc participants.

This Collection is modifiable. A modifiable Collection of the durable 2pc participants




getDurableParticipantsSnapshot
public Collection<ATParticipant> getDurableParticipantsSnapshot()(Code)



getParentCoordinatorRegistrationEPR
public EndpointReference getParentCoordinatorRegistrationEPR()(Code)



getRegistrant
public Registrant getRegistrant(String id)(Code)
Get the registrant with the specified id or null if it does not exist.
Parameters:
  id - the registrant id the Registrant object or null if the id does not exist



getRegistrants
public List<Registrant> getRegistrants()(Code)
Get the list of com.sun.xml.ws.tx.coordinator.Registrant s for this coordinated activity.

The returned list is unmodifiable (read-only). Add new Registrants with the ATCoordinator.addRegistrant(com.sun.xml.ws.tx.coordinator.Registrant,javax.xml.ws.WebServiceContext) api instead.

the list of Registrant objects




getTransaction
public Transaction getTransaction()(Code)



getTransactionTimeout
public int getTransactionTimeout() throws XAException(Code)



getVolatileParticipants
public Collection<ATParticipant> getVolatileParticipants()(Code)
Return a Collection of volatile 2pc participants.

This Collection is modifiable. A modifiable Collection of the volatile 2pc participants




getVolatileParticipantsSnapshot
public Collection<ATParticipant> getVolatileParticipantsSnapshot()(Code)



getWSATCoordinatorService
public static WSATCoordinator getWSATCoordinatorService()(Code)



hasOutstandingParticipants
public boolean hasOutstandingParticipants()(Code)



initiateCommit
public void initiateCommit()(Code)



initiateDurableCommit
public void initiateDurableCommit()(Code)



initiateDurablePrepare
public void initiateDurablePrepare()(Code)
TODO: Each PREPARED/READONLY Volatile ATParticipant should check if it is time to start the durable 2PC phase by calling this method.



initiateDurableRollback
public void initiateDurableRollback()(Code)



initiateRollback
public void initiateRollback()(Code)



initiateVolatileCommit
public void initiateVolatileCommit()(Code)



initiateVolatilePrepare
public void initiateVolatilePrepare()(Code)
Send 2PC prepare to all volatile participants

Volatile 2PC prepare constraint from 2004 WS-AT, section 3.3.1 the root coordinator begins the prepare phase of all participants registered for the Volatile 2PC protocol. All participants registered for this protocol must respond before a Prepare is issued to a participant registered for Durable 2PC. Further participants may register with the coordinator until the coordinator issues a Prepare to any durable participant.




initiateVolatileRollback
public void initiateVolatileRollback()(Code)



isAborting
boolean isAborting()(Code)



isSameRM
public boolean isSameRM(XAResource xAResource) throws XAException(Code)



isSubordinateCoordinator
public boolean isSubordinateCoordinator()(Code)



prepare
public int prepare(Xid xid) throws XAException(Code)
Synchronous prepare request invoked by JTS coordinator as part of its 2PC protocol.

Prepare this coordinator and return result of preparation.




prepared
public void prepared(String participantId)(Code)



prepared
public void prepared(String participantId, EndpointReference unknownParticipantReplyEPR)(Code)



readonly
public void readonly(String participantId)(Code)



recover
public Xid[] recover(int i) throws XAException(Code)



registerWithDurableParent
protected boolean registerWithDurableParent() throws RollbackException, SystemException(Code)
Enlist with parent of ATCoordinator which is JTA transaction manager.



registerWithVolatileParent
protected void registerWithVolatileParent()(Code)



removeRegistrant
public void removeRegistrant(String id)(Code)



replay
public void replay(String participantId)(Code)
Implement inbound event replay for Atomic Transaction 2PC Protocol(Coordinator View).



resumeTransaction
public void resumeTransaction() throws WebServiceException(Code)



rollback
public void rollback(Xid xid) throws XAException(Code)



setAborting
void setAborting()(Code)



setTransaction
public void setTransaction(Transaction txn)(Code)
Set once field.



setTransactionTimeout
public boolean setTransactionTimeout(int i) throws XAException(Code)



start
public void start(Xid xid, int flags) throws XAException(Code)



suspendTransaction
public Transaction suspendTransaction()(Code)



waitForCommitOrRollbackResponse
protected void waitForCommitOrRollbackResponse(Protocol protocol)(Code)



waitForDurablePrepareResponse
protected void waitForDurablePrepareResponse()(Code)
Wait for all Durable participants to respond to prepare.

Durable participant state is set before this method returns.




waitForVolatilePrepareResponse
protected void waitForVolatilePrepareResponse()(Code)
Wait for all volatile participants to respond to prepare.

Volatile participant state is set before this method returns.




Methods inherited from com.sun.xml.ws.tx.coordinator.Coordinator
abstract public void addRegistrant(Registrant registrant, WebServiceContext wsContext)(Code)(Java Doc)
abstract public boolean expirationGuard()(Code)(Java Doc)
public void expire()(Code)(Java Doc)
public void forget()(Code)(Java Doc)
public CoordinationContextInterface getContext()(Code)(Java Doc)
abstract public EndpointReference getCoordinatorProtocolServiceForRegistrant(Registrant r)(Code)(Java Doc)
public long getExpires()(Code)(Java Doc)
public Identifier getId()(Code)(Java Doc)
public String getIdValue()(Code)(Java Doc)
abstract public Registrant getRegistrant(String id)(Code)(Java Doc)
abstract public List<Registrant> getRegistrants()(Code)(Java Doc)
public CreateCoordinationContextType getRequest()(Code)(Java Doc)
public boolean isExpired()(Code)(Java Doc)
public boolean isSubordinate()(Code)(Java Doc)
public boolean registerWithRootRegistrationService(Registrant r)(Code)(Java Doc)
abstract public void removeRegistrant(String id)(Code)(Java Doc)
public void setExpired(boolean expired)(Code)(Java Doc)
public void setExpires(long i)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.