User: starksm Date: 01/03/30 17:12:30 Added: src/main/javax/transaction/xa XAException.java XAResource.java Xid.java Log: The javax.transaction extension classes Revision Changes Path 1.1 jboss-j2ee/src/main/javax/transaction/xa/XAException.java Index: XAException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction.xa; /** The XAException is thown by the Resource Manager (RM) to inform the Transaction Manager of error encountered for the transaction involved. @version $Revision: 1.1 $ */ public class XAException extends java.lang.Exception { /** Creates new <code>XAException</code> without detail message. */ public XAException() { } /** Constructs an <code>XAException</code> with the specified detail message. @param msg the detail message. */ public XAException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/xa/XAResource.java Index: XAResource.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction.xa; /** The XAResource interface is a Java mapping of the industry standard XA interface based on the X/Open CAE Specification (Distributed Transaction Processing: The XA Specification). The XA interface defines the contract between a Resource Manager and a Transaction Manager in a distributed transaction processing (DTP) environment. A JDBC driver or a JMS provider implements the this interface to support association between a global transaction and a database or message service connection. The XAResource interface can be supported by any transactional resource that is intended to be used by application programs in an environment where transactions are controlled by an external transaction manager. An example of such a resource is a database management system. An application may access data through multiple database connections. Each database connection is enlisted with the transaction manager as a transactional resource. The transaction manager obtains an XAResource for each connection participating in a global transaction. The transaction manager uses the start method to associate the global transaction with the resource, and it uses the end method to disassociate the transaction from the resource. The resource manager is responsible for associating the global transaction to all work performed on its data between the start and end method invocation. At transaction commit time, the resource managers are informed by the transaction manager to prepare, commit, or rollback a transaction according to the two-phase commit protocol. @version $Revision: 1.1 $ */ public interface XAResource { public static final int TMENDRSCAN = 8388608; public static final int TMFAIL = 536870912; public static final int TMJOIN = 2097152; public static final int TMNOFLAGS = 0; public static final int TMONEPHASE = 1073741824; public static final int TMRESUME = 134217728; public static final int TMSTARTRSCAN = 16777216; public static final int TMSUCCESS = 67108864; public static final int TMSUSPEND = 33554432; public static final int XA_RDONLY = 3; public static final int XA_OK = 0; public void commit(Xid xid, boolean onePhase) throws XAException; public void end(Xid xid, int flags) throws XAException; public void forget(Xid xid) throws XAException; public int getTransactionTimeout() throws XAException; public boolean isSameRM(XAResource xaRes) throws XAException; public int prepare(Xid xid) throws XAException; public Xid[] recover(int flag) throws XAException; public void rollback(Xid xid) throws XAException; public boolean setTransactionTimeout(int seconds) throws XAException; public void start(Xid xid, int flags) throws XAException; } 1.1 jboss-j2ee/src/main/javax/transaction/xa/Xid.java Index: Xid.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction.xa; /** The Xid interface is a Java mapping of the X/Open transaction identifier XID structure. This interface specifies three accessor methods to retrieve a global transaction?s format ID, global transaction ID, and branch qualifier. The Xid interface is used by the transaction manager and the resource managers. This interface is not visible to the application programs. @version $Revision: 1.1 $ */ public interface Xid { public static final int MAXGTRIDSIZE = 64; public static final int MAXBQUALSIZE = 64; public int getFormatId(); public byte[] getGlobalTransactionId(); public byte[] getBranchQualifier(); } _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development