Author: arnaudsimon
Date: Fri Jun 15 09:43:11 2007
New Revision: 547733

URL: http://svn.apache.org/viewvc?view=rev&rev=547733
Log:
includes the dtx part of AMQP 0.10 

Added:
    incubator/qpid/trunk/qpid/specs/dtx.0-10-dtx.xml

Added: incubator/qpid/trunk/qpid/specs/dtx.0-10-dtx.xml
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/specs/dtx.0-10-dtx.xml?view=auto&rev=547733
==============================================================================
--- incubator/qpid/trunk/qpid/specs/dtx.0-10-dtx.xml (added)
+++ incubator/qpid/trunk/qpid/specs/dtx.0-10-dtx.xml Fri Jun 15 09:43:11 2007
@@ -0,0 +1,825 @@
+<?xml version="1.0"?>
+
+<!--
+       Copyright Notice
+       ================
+       (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy 
Technologies Inc.,
+       iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
+       TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
+       
+       License
+       =======
+       JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies 
Inc., iMatix 
+       Corporation, IONA Technologies, Red Hat, Inc., TWIST Process 
Innovations, and 
+       29West Inc. (collectively, the "Authors") each hereby grants to you a 
worldwide,
+       perpetual, royalty-free, nontransferable, nonexclusive license to
+       (i) copy, display, distribute and implement the Advanced Messaging 
Queue Protocol
+       ("AMQP") Specification and (ii) the Licensed Claims that are held by
+       the Authors, all for the purpose of implementing the Advanced Messaging
+       Queue Protocol Specification. Your license and any rights under this
+       Agreement will terminate immediately without notice from
+       any Author if you bring any claim, suit, demand, or action related to
+       the Advanced Messaging Queue Protocol Specification against any Author.
+       Upon termination, you shall destroy all copies of the Advanced Messaging
+       Queue Protocol Specification in your possession or control.
+       
+       As used hereunder, "Licensed Claims" means those claims of a patent or
+       patent application, throughout the world, excluding design patents and
+       design registrations, owned or controlled, or that can be sublicensed
+       without fee and in compliance with the requirements of this
+       Agreement, by an Author or its affiliates now or at any
+       future time and which would necessarily be infringed by implementation
+       of the Advanced Messaging Queue Protocol Specification. A claim is
+       necessarily infringed hereunder only when it is not possible to avoid
+       infringing it because there is no plausible non-infringing alternative
+       for implementing the required portions of the Advanced Messaging Queue
+       Protocol Specification. Notwithstanding the foregoing, Licensed Claims
+       shall not include any claims other than as set forth above even if
+       contained in the same patent as Licensed Claims; or that read solely
+       on any implementations of any portion of the Advanced Messaging Queue
+       Protocol Specification that are not required by the Advanced Messaging
+       Queue Protocol Specification, or that, if licensed, would require a
+       payment of royalties by the licensor to unaffiliated third parties.
+       Moreover, Licensed Claims shall not include (i) any enabling 
technologies
+       that may be necessary to make or use any Licensed Product but are not
+       themselves expressly set forth in the Advanced Messaging Queue Protocol
+       Specification (e.g., semiconductor manufacturing technology, compiler
+       technology, object oriented technology, networking technology, operating
+       system technology, and the like); or (ii) the implementation of other
+       published standards developed elsewhere and merely referred to in the
+       body of the Advanced Messaging Queue Protocol Specification, or
+       (iii) any Licensed Product and any combinations thereof the purpose or
+       function of which is not required for compliance with the Advanced
+       Messaging Queue Protocol Specification. For purposes of this definition,
+       the Advanced Messaging Queue Protocol Specification shall be deemed to
+       include both architectural and interconnection requirements essential
+       for interoperability and may also include supporting source code 
artifacts
+       where such architectural, interconnection requirements and source code
+       artifacts are expressly identified as being required or documentation to
+       achieve compliance with the Advanced Messaging Queue Protocol 
Specification.
+       
+       As used hereunder, "Licensed Products" means only those specific 
portions
+       of products (hardware, software or combinations thereof) that implement
+       and are compliant with all relevant portions of the Advanced Messaging
+       Queue Protocol Specification.
+       
+       The following disclaimers, which you hereby also acknowledge as to any
+       use you may make of the Advanced Messaging Queue Protocol Specification:
+       
+       THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
+       AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
+       IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
+       FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
+       CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
+       SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
+       MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD 
PARTY 
+       PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+       
+       THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
+       INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
+       USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
+       PROTOCOL SPECIFICATION.
+       
+       The name and trademarks of the Authors may NOT be used in any manner,
+       including advertising or publicity pertaining to the Advanced Messaging
+       Queue Protocol Specification or its contents without specific, written
+       prior permission. Title to copyright in the Advanced Messaging Queue
+       Protocol Specification will at all times remain with the Authors.
+       
+       No other rights are granted by implication, estoppel or otherwise.
+       
+       Upon termination of your license or rights under this Agreement, you
+       shall destroy all copies of the Advanced Messaging Queue Protocol
+       Specification in your possession or control.
+       
+       Trademarks
+       ==========
+       "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
+       Octagon Symbol are trademarks of JPMorgan Chase & Co.
+       
+       IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
+       
+       IONA, IONA Technologies, and the IONA logos are trademarks of IONA
+       Technologies PLC and/or its subsidiaries.
+       
+       LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
+       trademarks of Red Hat, Inc. in the US and other countries.
+       
+       Java, all Java-based trademarks and OpenOffice.org are trademarks of
+       Sun Microsystems, Inc. in the United States, other countries, or both.
+       
+       Other company, product, or service names may be trademarks or service
+       marks of others.
+       
+       Links to full AMQP specification:
+       =================================
+       http://www.envoytech.org/spec/amq/
+       http://www.iona.com/opensource/amqp/
+       http://www.redhat.com/solutions/specifications/amqp/
+       http://www.twiststandards.org/tiki-index.php?page=AMQ
+       http://www.imatix.com/amqp
+       
+-->
+
+<amqp major="8" minor="0" port="5672" comment="AMQ Protocol version 0-8">
+
+<!--  XA constants --> 
+<constant name="xa-rbrollback" value="1">
+  <doc>The rollback was caused by an unspecified reason.</doc> 
+</constant>
+<constant name="xa-rbtimeout" value="2">
+  <doc>A transaction branch took too long.</doc> 
+</constant>
+<constant name="xa-heurhaz" value="3">
+  <doc>The transaction branch may have been heuristically completed.</doc> 
+</constant>
+<constant name="xa-heurcom" value="4">
+  <doc>The transaction branch has been heuristically committed.</doc> 
+</constant>
+<constant name="xa-heurrb" value="5">
+  <doc>The transaction branch has been heuristically rolled back.</doc> 
+</constant>
+<constant name="xa-heurmix" value="6">
+  <doc>The transaction branch has been heuristically committed and rolled 
back.</doc> 
+</constant>
+<constant name="xa-rdonly" value="7">
+  <doc>The transaction branch was read-only and has been committed.</doc> 
+</constant>
+<constant name="xa-ok" value="8">
+  <doc>Normal execution.</doc> 
+</constant>
+
+<!-- DTX domains -->
+ <domain name = "Xid" type = "longstr" label = "Transaction branch identifier">
+     <doc>
+       An Xid uniquely identifies a transaction branch.   
+    </doc>
+    <rule name = "implementation">
+      <doc>
+        Xid contains a format identifier, two length fields and a data field:  
+       format_id       long
+       gtrid_length    octet   
+       bqual_length    octet  
+       data            
+        format_id is an implementation specific format identifier
+       the data field is a sequence of octets of at most 128 bytes containing 
the txn id and the branch id
+       gtrid_length field indicates how many bytes of this form the 
transaction id
+       bqual_length field indicates how many bytes of this form the branch id
+       The sum of the two lengths must equal the length of the data field
+      </doc>      
+    </rule>   
+  </domain>
+
+ <domain name="field-table" type="table">  
+ </domain>
+
+ <domain name="bit" type="bit" label="single bit">
+ </domain>
+
+ <domain name="short" type="short" label="16-bit integer">
+ </domain>
+
+ <domain name="long"  type="long"  label="32-bit integer">
+ </domain>
+
+<!-- dtx-->  
+
+<!-- ==  dtx-demarcation  
========================================================== -->
+
+ 
+ <class name = "dtx-demarcation" handler = "channel" index = "100" label = 
"demarcates distributed transaction branches">
+    <doc>
+       This class is part of the X-Open XA distributed transaction protocol 
support. It allows a channel to be 
+       selected for use with distributed transactions and the transactional 
boundaries for work on that channel
+       to be demarcated.
+    </doc>
+    <doc type = "grammar">
+      dtx-demarcation     = C:SELECT S:SELECT-OK *demarcation
+
+      demarcation         = C:START S:START-OK C:END S:END-OK                  
          
+    </doc>
+
+   
+    <chassis name = "server" implement = "MAY" />
+    <chassis name = "client" implement = "MAY" />
+
+ 
+    <!-- - - - SELECT - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -->
+
+    <method name = "select" synchronous = "1" index = "10" label = "select 
distributed transaction mode">
+      <doc>
+         This method sets the channel to use distributed transactions. The 
client must use this method at least once on a channel before using XA 
demarcation operations.
+      </doc>
+      <chassis name = "server" implement = "MAY" />
+      <response name = "select-ok" />
+    </method>
+
+    <!-- - - - SELECT-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "select-ok" synchronous = "1" index = "11" label = "confirm 
distributed transaction mode">
+      <doc>
+        This method confirms to the client that the channel was successfully 
set to use distributed transactions.
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+    </method>
+
+     <!-- - - START - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -->
+
+    <method name = "start" synchronous = "1" index = "20" label = "Start a 
transaction branch">
+      <doc>
+        This method is called when messages should be produced and consumed on 
behalf a transaction branch identified by xid. 
+      </doc>
+      <chassis name = "server" implement = "MAY" />
+      <response name = "start-ok" />
+      
+
+      <field name = "xid" domain = "Xid" label = "Start any work associated 
with transaction branch with Xid xid">
+        <doc>
+          Specifies the xid of the transaction branch to be started. 
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+
+      <field name = "join" domain = "bit" label = "Indicate whether this is 
joining an already associated  Xid">
+        <doc>    
+         Indicate that the start applies to joining a transaction previously 
seen. 
+        </doc>      
+        <assert check = "notnull" />   
+      </field>
+
+      <field name = "resume" domain = "bit" label = "Indicate whether this is 
resuming a suspended transaction branch">
+        <doc>    
+         Indicate that the start applies to resuming a suspended transaction 
branch specified.
+        </doc>       
+        <assert check = "notnull" />   
+      </field>
+    </method>
+    
+    <!-- - - - START-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "start-ok" synchronous = "1" index = "21" label = "confirm 
distributed transaction start">
+      <doc>
+        This method confirms to the client that the transaction branch is 
started or specify the error condition. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+      
+      <field name = "flags" domain = "short" label = "xa-ok or xa-rbrollback">
+        <doc> 
+         xa-ok: Normal execution. 
+         xa-rbrollback: The broker marked the transaction branch rollback-only 
for an unspecified reason.         
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+
+
+    <!-- - - END - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -->
+
+    <method name = "end" synchronous = "1" index = "30" label = "End a 
transaction branch">
+      <doc>
+        This method is called when the work done on behalf a transaction 
branch finishes or needs to be suspended.     
+      </doc>
+      <chassis name = "server" implement = "MAY" />
+      <response name = "end-ok" />
+
+      <field name = "xid" domain = "Xid" label = "End any work associated with 
transaction branch with Xid xid">
+        <doc>
+          Specifies the xid of the transaction branch to be ended. 
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+
+      <field name = "fail" domain = "bit" label = "Indicate whether the 
portion of work has failed">
+        <doc>    
+         Indicates that the portion of work has failed otherwise the portion 
of work has completed successfully.
+        </doc>           
+        <assert check = "notnull" />   
+      </field>
+
+      <field name = "suspend" domain = "bit" label = "Indicate that the 
transaction branch is temporarily suspended in an incomplete state">
+        <doc>    
+         Indicates that the transaction branch is temporarily suspended in an 
incomplete state. 
+        </doc>            
+        <assert check = "notnull" />   
+      </field>
+
+    </method>
+   
+     <!-- - - - END-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -->
+
+    <method name = "end-ok" synchronous = "1" index = "31" label = "confirm 
distributed transaction end">
+      <doc>
+        This method confirms to the client that the transaction branch is 
ended or specify the error condition. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+      
+       <field name = "flags" domain = "short" label = "xa-ok, xa-rbrollback, 
xa-rbtimeout">
+        <doc> 
+         xa-ok: Normal execution. 
+         xa-rbrollback: The broker marked the transaction branch rollback-only 
for an unspecified reason.
+        xa-rbtimeout: The work represented by this transaction branch took too 
long.
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>     
+</class>
+ 
+ 
+ <!-- ==  dtx-coordination   
========================================================== -->
+
+<class name = "dtx-coordination" handler = "channel" index = "105" label = 
"coordinate transaction outcomes">
+    <doc>
+      This class is part of the X-Open XA distributed transaction protocol 
support. 
+      It allows the transaction manager to coordinate transaction outcomes. 
+    </doc>
+ 
+    <doc type = "grammar">
+
+      dtx-coordination    = *coordination
+
+      coordination        =  command 
+                          /  outcome
+                          /  recovery
+
+      command             = C:SET-TIMEOUT S:SET-TIMEOUT-OK
+                         / C:GET-TIMEOUT S:GET-TIMEOUT-OK
+                          
+      outcome             = one-phase-commit
+                          / one-phase-rollback
+                          / two-phase-commit
+                          / two-phase-rollback
+
+      one-phase-commit    = C:COMMIT S:COMMIT-OK
+
+      one-phase-rollback  = C:ROLLBACK S:ROLLBACK-OK
+
+      two-phase-commit    = C:PREPARE S:PREPARE-OK C:COMMIT S:COMMIT-OK
+
+      two-phase-rollback  = C:PREPARE S:PREPARE-OK C:ROLLBACK S:ROLLBACK-OK
+
+      recovery           = C:RECOVER S:RECOVER-OK *recovery-outcome
+
+      recovery-outcome    = one-phase-commit
+                          / one-phase-rollback
+                          / C:FORGET S:FORGET-OK
+    </doc>
+
+    <chassis name = "server" implement = "MAY" />
+    <chassis name = "client" implement = "MAY" />
+
+    <rule name = "security">
+      <doc>
+       Access-tickets are propagated with XA demarcation methods with the aim 
of 
+       restricting which users are allowed to control which transactions. 
+       The server MAY restrict transaction coordination to a particular 
identity.       
+      </doc>
+      <doc type = "scenario">        
+      </doc>
+    </rule>    
+
+   
+    <!-- - - COMMIT - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -->
+
+    <method name = "commit" synchronous = "1" index = "10" label = "Commit the 
work done on behalf a transaction branch ">
+      <doc>
+        This method commits the work associated with xid. Any produced 
messages are made available and any consumed messages are discarded. 
+      </doc>
+      <chassis name = "server" implement = "MAY" />
+      <response name = "commit-ok" />
+      
+      <rule name = "internalError">
+         <doc>
+        If an error occurs in committing the transaction branch then the 
server MUST raise a channel exception with reply code 541 (internal error)
+         </doc>
+      </rule> 
+
+      <rule name = "commandInvalid">
+         <doc>
+        If the method is invoked in an improper context (see class grammar) 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+
+      <field name = "xid" domain = "Xid" label = "Commit the work associated 
with Xid xid">
+        <doc> 
+          Specifies the Xid of the transaction branch to be committed. 
+        </doc>
+        <assert check = "notnull" />   
+        <!-- rules -->
+       <rule name = "unknownXid">
+        <doc>
+         If Xid is unknown (the transaction branch has not been started or has 
already been ended) then the server MUST raise a channel exception with reply 
code 404 (not found).
+        </doc>
+      </rule>
+      <rule name = "notdisassociated">
+         <doc>
+        If this method is called when Xid is still associated with a channel 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+      </field>
+
+      <field name = "one-phase" domain = "bit" label = "Indicate that 
one-phase optimization must be used">
+        <doc>
+          When set then one-phase commit optimization is used.  
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+
+    <!-- - - - COMMIT-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "commit-ok" synchronous = "1" index = "11" label = "confirm 
distributed transaction commit">
+      <doc>
+        This method confirms to the client that the transaction branch is 
committed or specify the error condition. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+      
+       <field name = "flags" domain = "short" label = "xa-ok, xa-heurhaz, 
xa-heurcom, xa-heurrb, xa-heurmix, xa-rbrollback">
+        <doc> 
+         xa-ok: Normal execution,
+        xa-heurhaz: Due to some failure, the work done on behalf of the 
specified transaction branch may have been heuristically completed.
+        xa-heurcom: Due to a heuristic decision, the work done on behalf of 
the specified transaction
+   branch was committed.
+       xa-heurrb: Due to a heuristic decision, the work done on behalf of the 
specified transaction
+   branch was rolled back.
+       xa-heurmix: Due to a heuristic decision, the work done on behalf of the 
specified transaction
+   branch was partially committed and partially rolled back.
+        xa-rbrollback: The broker marked the transaction branch rollback-only 
for an unspecified reason.         
+       xa-rbtimeout: The work represented by this transaction branch took too 
long.    
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+
+
+    <!-- - - FORGET - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -->
+
+    <method name = "forget" synchronous = "1" index = "20" label = "Discard 
knowledge of a heuristically-completed transaction branch">
+      <doc>
+        This method is called to forget about a heuristically completed 
transaction branch.       
+      </doc>
+      <chassis name = "server" implement = "MAY" />
+      <response name = "forget-ok" />
+
+      <rule name = "internalError ">
+         <doc>
+        If an error occurs in forgetting the transaction branch then the 
server MUST raise a channel exception with reply code 541 (internal error)
+         </doc>
+      </rule>  
+      
+      <rule name = "commandInvalid ">
+         <doc>
+        If the method is invoked in an improper context (see class grammar) 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+
+      <field name = "xid" domain = "Xid" label = "Erase RM its knowledge of 
Xid xid">
+        <doc> 
+          Specifies the xid of the transaction branch to be forgotten. 
+        </doc>
+        <assert check = "notnull" />   
+        <!-- rules -->
+      <rule name = "unknownXid">
+        <doc>
+         If Xid is unknown (the transaction branch has not been started or has 
already been ended) then the server MUST raise a channel exception with reply 
code 404 (not found).
+        </doc>
+      </rule>
+      <rule name = "notdisassociated">
+         <doc>
+        If this method is called when Xid is still associated with a channel 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+      </field>
+    </method>
+
+    <!-- - - - FORGET-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "forget-ok" synchronous = "1" index = "21" label = "Confirm 
distributed transaction forget">
+      <doc>
+        This method confirms to the client that the transaction branch is 
forgotten or specify the error condition. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />          
+    </method>
+ 
+    <!-- - - - get-Timeout - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - -->
+
+    <method name = "get-timeout" synchronous = "1" index = "30" label = 
"Obtain the transaction timeout value in seconds">
+      <doc>
+        This method obtains the current transaction timeout value in seconds. 
+       If setTimeout was not used prior to invoking this method, the return 
value is the default timeout; otherwise, the value used in the previous 
setTimeout call is returned.
+      </doc>
+      <chassis name = "server" implement = "MAY" />
+      <response name = "get-timeout-ok" />
+
+
+      <field name = "xid" domain = "Xid" label = "Xid of the branch to get the 
timeout value">
+        <doc> 
+          Specifies the Xid of the transaction branch for getting the timeout.
+        </doc>
+        <assert check = "notnull" />   
+        <!-- rules -->
+      <rule name = "unknownXid">
+        <doc>
+         If Xid is unknown (the transaction branch has not been started or has 
already been ended) then the server MUST raise a channel exception with reply 
code 404 (not found).
+        </doc>
+      </rule>
+      </field>
+
+      <rule name = "internalError ">
+         <doc>
+        If an error occurs in setting the transaction timeout then the server 
MUST raise a channel exception with reply code 541 (internal error)
+         </doc>
+      </rule> 
+    </method>
+
+    <!-- - - - get-Timeout-OK - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - - -->
+
+    <method name = "get-timeout-ok" synchronous = "1" index = "31" label = 
"Return transaction timeout">
+      <doc>
+        This method returns the current transaction timeout value in seconds. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+      
+       <field name = "timeout" domain = "long" label = "The current 
transaction timeout value">
+        <doc> 
+        The current transaction timeout value in seconds. 
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+ 
+    <!-- - - PREPARE - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -->
+
+    <method name = "prepare" synchronous = "1" index = "40" label = "Ask to 
prepare a transaction branch">
+      <doc>
+        This method prepares for commitment any message produced or consumed 
on behalf of xid.          
+      </doc>
+       
+      <rule name = "internalError">
+         <doc>
+        If an error occurs in preparing the transaction branch then the server 
MUST raise a channel exception with reply code 541 (internal error). The 
specified Xid may or may not have been prepared.
+         </doc>
+      </rule> 
+
+      <rule name = "commandInvalid">
+         <doc>
+        If the method is invoked in an improper context (see class grammar) 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+
+      <rule name = "obligation1">
+        <doc>
+          Once this method successfully returns it is guaranteed that the 
transaction branch may be either 
+         committed or rolled back regardless of failures.
+        </doc>
+      </rule>
+
+      <rule name = "obligation2">
+        <doc>
+          The knowledge of xid cannot be erased before commit or rollback 
complete the branch. 
+        </doc>
+      </rule>
+
+      <chassis name = "server" implement = "MAY" />
+      <response name = "prepare-ok" />
+
+      <field name = "xid" domain = "Xid" label = "Prepare for commitment any 
work associated with Xid xid">
+        <doc> 
+          Specifies the Xid of the transaction branch that can be prepared.
+        </doc>
+        <assert check = "notnull" />   
+        <!-- rules -->
+       <rule name = "unknownXid">
+        <doc>
+         If Xid is unknown (the transaction branch has not been started or has 
already been ended) then the server MUST raise a channel exception with reply 
code 404 (not found).
+        </doc>
+        </rule>
+          <rule name = "notdisassociated">
+         <doc>
+        If this method is called when Xid is still associated with a channel 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+        </rule>
+      </field>
+     </method>
+
+
+    <!-- - - - PREPARE-OK - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - -->
+
+    <method name = "prepare-ok" synchronous = "1" index = "41" label = 
"confirm distributed transaction prepare">
+      <doc>
+        This method confirms to the client that the transaction branch is 
prepared or specify the error condition. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+      
+       <field name = "flags" domain = "short" label = "xa-ok, xa-rdonly, 
xa-rbrollback, xa-rbtimeout">
+        <doc> 
+         xa-ok: Normal execution.
+         xa-rdonly: The transaction branch was read-only and has been 
committed.
+         xa-rbrollback: The broker marked the transaction branch rollback-only 
for an unspecified reason.    
+        xa-rbtimeout: The work represented by this transaction branch took too 
long.            
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+
+
+    <!-- - - RECOVER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - -  -->
+
+    <method name = "recover" synchronous = "1" index = "50" label = "Get a 
list of Xids the RM has prepared or  heuristically completed">
+      <doc>
+       This method is called to obtain a list of transaction branches that are 
in a 
+       prepared or heuristically completed state.
+      </doc>
+       
+      <rule name = "internalError ">
+         <doc>
+        If an error occurs in recovering then the server MUST raise a channel 
exception with reply code 541 (internal error)
+         </doc>
+      </rule> 
+
+      <rule name = "startEnd">
+          <doc>
+             If this endscan is used in conjunction with startscan then a 
single call starts and then ends a scan.     
+          </doc>
+      </rule>
+
+      <rule name = "mustBeStarted">
+          <doc>
+             If none of endscan and startscan are set then a recovery scan 
must already be started otherwise the server MUST raise a channel exception 
with reply code 503 (command invalid)
+          </doc>
+      </rule>
+
+      <chassis name = "server" implement = "MAY" />
+      <response name = "recover-ok" />
+
+
+      <field name = "startscan" domain = "bit" label = "Indicates that 
recovery scan should start">
+        <doc> 
+          Indicates that recovery scan should start. 
+        </doc>
+       <rule name = "recoveryAlreadyOpen">
+          <doc>
+           If a recovery scan is already open, the effect is as if the 
recovery scan were ended and then restarted.
+          </doc>
+        </rule>
+        <assert check = "notnull" />   
+      </field>
+      
+      <field name = "endscan" domain = "long" label = "indicates that the 
recovery scan should end after returning the Xids">
+        <doc>           
+         Indicates that the recovery scan should end after returning the Xids. 
          
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+   
+
+    <!-- - - RECOVER-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - -->
+
+    <method name = "recover-ok" synchronous = "1" index = "51" label = "list 
of Xids to be recovered">
+      <doc>
+       Returns to the client a table with single item that is a sequence of 
transaction Xids that are in a prepared or heuristically completed state.
+      </doc>
+
+      <chassis name = "client" implement = "MAY" />
+     
+      <field name = "in-doubt" domain = "field-table" label = "Table 
containing the sequence of xids to be recovered">
+        <doc>
+          Xids that are in a prepared or heuristically completed state.
+        </doc>
+       <rule name = "sequenceOfXids">
+        <doc>
+          The field table must contain a field called 'xids' of type sequence 
of longstrs representing the Xids that are in a prepared or heuristically 
completed state.
+        </doc>
+       </rule>
+        <assert check = "notnull" />
+      </field>
+    </method>
+
+
+    <!-- - - ROLLBACK - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "rollback" synchronous = "1" index = "60" label = "Rollback 
a transaction branch">
+      <doc>
+        This method rolls back the work associated with xid. Any produced 
messages are discarded 
+       and any consumed messages are re-enqueued.      
+      </doc>
+
+      <rule name = "internalError">
+         <doc>
+        If an error occurs in rolling back the transaction branch then the 
server MUST raise a channel exception with reply code 541 (internal error)
+         </doc>
+      </rule> 
+
+      <rule name = "commandInvalid">
+         <doc>
+        If the method is invoked in an improper context (see class grammar) 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+
+      <chassis name = "server" implement = "MAY" />
+      <response name = "rollback-ok" />
+
+      <field name = "xid" domain = "Xid" label = "Rollback any work associated 
with Xid xid">
+        <doc> 
+          Specifies the Xid of the transaction branch that can be rolled back.
+        </doc>
+        <assert check = "notnull" />   
+        <!-- rules -->
+      <rule name = "unknownXid">
+        <doc>
+         If Xid is unknown (the transaction branch has not been started or has 
already been ended) then the server MUST raise a channel exception with reply 
code 404 (not found).
+        </doc>
+      </rule>
+      <rule name = "notdisassociated">
+         <doc>
+        If this method is called when Xid is still associated with a channel 
then the server MUST raise a channel exception with reply code 503 (command 
invalid)
+         </doc>
+      </rule>
+      </field>
+    </method>
+
+  <!-- - - - ROLLBACK-OK - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "rollback-ok" synchronous = "1" index = "61" label = 
"confirm distributed transaction rollback">
+      <doc>
+        This method confirms to the client that the transaction branch is 
rolled back or specify the error condition. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+      
+       <field name = "flags" domain = "short" label = "xa-ok, xa-heurhaz, 
xa-heurcom, xa-heurrb, xa-heurmix, xa-rbrollback">
+        <doc> 
+         xa-ok: Normal execution,
+        xa-heurhaz: Due to some failure, the work done on behalf of the 
specified transaction branch may have been heuristically completed.
+        xa-heurcom: Due to a heuristic decision, the work done on behalf of 
the specified transaction
+   branch was committed.
+       xa-heurrb: Due to a heuristic decision, the work done on behalf of the 
specified transaction
+   branch was rolled back.
+       xa-heurmix: Due to a heuristic decision, the work done on behalf of the 
specified transaction
+   branch was partially committed and partially rolled back.
+        xa-rbrollback: The broker marked the transaction branch rollback-only 
for an unspecified reason. 
+       xa-rbtimeout: The work represented by this transaction branch took too 
long.        
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+
+
+   <!-- - - SETTIMEOUT - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - -->
+
+    <method name = "set-timeout" synchronous = "1" index = "70" label = "Set 
the transaction timeout value">
+      <doc>
+        Sets the specified transaction branch timeout value in seconds.        
+      </doc>
+
+      <rule name = "internalError ">
+         <doc>
+        If an error occurs in setting the transaction timeout then the server 
MUST raise a channel exception with reply code 541 (internal error)
+         </doc>
+      </rule> 
+
+      <rule name = "effective">
+        <doc>
+          Once set, this timeout value is effective until this method is 
reinvoked with a different value.
+        </doc>
+      </rule>
+
+      <rule name = "reset">
+        <doc>
+          A value of zero resets the timeout value to the default value.
+        </doc>
+      </rule>
+
+      <chassis name = "server" implement = "MAY" />
+      <response name = "set-timeout-ok" />
+
+       <field name = "xid" domain = "Xid" label = "Xid of the branch to set 
the timeout value">
+        <doc> 
+          Specifies the Xid of the transaction branch for setting the timeout.
+        </doc>
+        <assert check = "notnull" />   
+        <!-- rules -->
+      <rule name = "unknownXid">
+        <doc>
+         If Xid is unknown (the transaction branch has not been started or has 
already been ended) then the server MUST raise a channel exception with reply 
code 404 (not found).
+        </doc>
+      </rule>
+      </field>
+
+      <field name = "timeout" domain = "long" label = "The transaction timeout 
value in seconds">
+        <doc> 
+          The transaction timeout value in seconds.
+        </doc>
+        <assert check = "notnull" />   
+      </field>
+    </method>
+
+    <!-- - - - SETTIMEOUT-OK - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - - -->
+
+    <method name = "set-timeout-ok" synchronous = "1" index = "71" label = 
"confirm timeout set">
+      <doc>
+        This method confirms that the timeout has been set. 
+      </doc>
+      <chassis name = "client" implement = "MAY" />
+    </method> 
+</class>
+</amqp>
\ No newline at end of file


Reply via email to