User: starksm Date: 01/03/30 17:12:30 Modified: src/main/javax/transaction UserTransaction.java Added: src/main/javax/transaction HeuristicCommitException.java HeuristicMixedException.java HeuristicRollbackException.java InvalidTransactionException.java NotSupportedException.java RollbackException.java Status.java Synchronization.java SystemException.java Transaction.java TransactionManager.java TransactionRequiredException.java TransactionRolledbackException.java Log: The javax.transaction extension classes Revision Changes Path 1.2 +23 -1 jboss-j2ee/src/main/javax/transaction/UserTransaction.java Index: UserTransaction.java =================================================================== RCS file: /cvsroot/jboss/jboss-j2ee/src/main/javax/transaction/UserTransaction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- UserTransaction.java 2001/03/30 11:37:51 1.1 +++ UserTransaction.java 2001/03/31 01:12:29 1.2 @@ -1,3 +1,25 @@ +/* + * JBoss, the OpenSource EJB server + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ package javax.transaction; -public interface UserTransaction {}; +/** The UserTransaction interface defines the methods that allow an application +to explicitly manage transaction boundaries. + +@version $Revision: 1.2 $ +*/ +public interface UserTransaction +{ + public void begin() throws NotSupportedException, SystemException; + public void commit() throws RollbackException, HeuristicMixedException, + HeuristicRollbackException, SecurityException, + IllegalStateException, SystemException; + public int getStatus() throws SystemException; + public void rollback() throws IllegalStateException, SecurityException, + SystemException; + public void setRollbackOnly() throws IllegalStateException, SystemException; + public void setTransactionTimeout(int seconds) throws SystemException; +} 1.1 jboss-j2ee/src/main/javax/transaction/HeuristicCommitException.java Index: HeuristicCommitException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** This exception is thrown by the rollback operation on a resource to report that a heuristic decision was made and that all relevant updates have been committed. @version $Revision: 1.1 $ */ public class HeuristicCommitException extends Exception { /** Creates new <code>HeuristicMixedException</code> without detail message. */ public HeuristicCommitException() { } /** Constructs an <code>HeuristicCommitException</code> with the specified detail message. @param msg the detail message. */ public HeuristicCommitException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/HeuristicMixedException.java Index: HeuristicMixedException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** This exception is thrown to report that a heuristic decision was made and that some relevant updates have been committed and others have been rolled back. @version $Revision: 1.1 $ */ public class HeuristicMixedException extends Exception { /** Creates new <code>HeuristicMixedException</code> without detail message. */ public HeuristicMixedException() { } /** Constructs an <code>HeuristicMixedException</code> with the specified detail message. @param msg the detail message. */ public HeuristicMixedException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/HeuristicRollbackException.java Index: HeuristicRollbackException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** This exception is thrown by the commit operation to report that a heuristic decision was made and that all relevant updates have been rolled back. @version $Revision: 1.1 $ */ public class HeuristicRollbackException extends Exception { /** Creates new <code>HeuristicRollbackException</code> without detail message. */ public HeuristicRollbackException() { } /** Constructs an <code>HeuristicRollbackException</code> with the specified detail message. @param msg the detail message. */ public HeuristicRollbackException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/InvalidTransactionException.java Index: InvalidTransactionException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; import java.rmi.RemoteException; /** This exception indicates that the request carried an invalid transaction context. For example, this exception could be raised if an error occurred when trying to register a resource. @version $Revision: 1.1 $ */ public class InvalidTransactionException extends RemoteException { /** Creates new <code>InvalidTransactionException</code> without detail message. */ public InvalidTransactionException() { } /** Constructs an <code>InvalidTransactionException</code> with the specified detail message. @param msg the detail message. */ public InvalidTransactionException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/NotSupportedException.java Index: NotSupportedException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** NotSupportedException exception indicates that the request cannot be executed because the operation is not a supported feature. For example, the Transaction Manager throws this exception when a calling thread attempts to start a new transaction when the thread is already associated with a transaction because nested transaction is not supported. @version $Revision: 1.1 $ */ public class NotSupportedException extends Exception { /** Creates new <code>NotSupportedException</code> without detail message. */ public NotSupportedException() { } /** Constructs an <code>NotSupportedException</code> with the specified detail message. @param msg the detail message. */ public NotSupportedException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/RollbackException.java Index: RollbackException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** RollbackException exception is thrown when the transaction has been marked for rollback only or the transaction has been rolled back instead of committed. This is a local exception thrown by methods in the UserTransaction, Transaction, and TransactionManager interfaces. @version $Revision: 1.1 $ */ public class RollbackException extends Exception { /** Creates new <code>RollbackException</code> without detail message. */ public RollbackException() { } /** Constructs an <code>RollbackException</code> with the specified detail message. @param msg the detail message. */ public RollbackException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/Status.java Index: Status.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** The Status interface defines the static variable for transaction status code. @version $Revision: 1.1 $ */ public interface Status { public static final int STATUS_ACTIVE = 0; public static final int STATUS_MARKED_ROLLBACK = 1; public static final int STATUS_PREPARED = 2; public static final int STATUS_COMMITTED = 3; public static final int STATUS_ROLLEDBACK = 4; public static final int STATUS_UNKNOWN = 5; public static final int STATUS_NO_TRANSACTION = 6; public static final int STATUS_PREPARING = 7; public static final int STATUS_COMMITTING = 8; public static final int STATUS_ROLLING_BACK = 9; } 1.1 jboss-j2ee/src/main/javax/transaction/Synchronization.java Index: Synchronization.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** The transaction manager supports a synchronization mechanism that allows the interested party to be notified before and after the transaction completes. Using the registerSynchronization method, the application server registers a Synchronization object for the transaction currently associated with the target Transaction object. @version $Revision: 1.1 $ */ public interface Synchronization { public void beforeCompletion(); public void afterCompletion(int status); } 1.1 jboss-j2ee/src/main/javax/transaction/SystemException.java Index: SystemException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** The SystemException is thrown by the transaction manager to indicate that it has encountered an unexpected error condition that prevents future transaction services from proceeding. @version $Revision: 1.1 $ */ public class SystemException extends Exception { /** Creates new <code>SystemException</code> without detail message. */ public SystemException() { } /** Constructs an <code>SystemException</code> with the specified detail message. @param msg the detail message. */ public SystemException(String msg) { super(msg); } /** Constructs an <code>SystemException</code> with the specified detail message. @param errcode the error code for the exception */ public SystemException(int errcode) { } } 1.1 jboss-j2ee/src/main/javax/transaction/Transaction.java Index: Transaction.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; import java.lang.SecurityException; import javax.transaction.xa.XAResource; /** The Transaction interface allows operations to be performed against the transaction in the target Transactioin object. A Transaction object is created corresponding to each global transaction creation. The Transaction object can be used for resource enlistment, synchronization registration, transaction completion and status query operations. @version $Revision: 1.1 $ */ public interface Transaction { public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, SystemException; public boolean delistResource(XAResource xaRes, int flag) throws IllegalStateException, SystemException; public boolean enlistResource(XAResource xaRes) throws RollbackException, IllegalStateException, SystemException; public int getStatus() throws SystemException; public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException; public void rollback() throws IllegalStateException, SystemException; public void setRollbackOnly() throws IllegalStateException, SystemException; } 1.1 jboss-j2ee/src/main/javax/transaction/TransactionManager.java Index: TransactionManager.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; /** The TransactionManager interface defines the methods that allow an application server to manage transaction boundaries. @version $Revision: 1.1 $ */ public interface TransactionManager { public void begin() throws NotSupportedException, SystemException; public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException; public int getStatus() throws SystemException; public Transaction getTransaction() throws SystemException; public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException; public void rollback() throws IllegalStateException, SecurityException, SystemException; public void setRollbackOnly() throws IllegalStateException, SystemException; public void setTransactionTimeout(int seconds) throws SystemException; public Transaction suspend() throws SystemException; } 1.1 jboss-j2ee/src/main/javax/transaction/TransactionRequiredException.java Index: TransactionRequiredException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; import java.rmi.RemoteException; /** This exception indicates that a request carried a null transaction context, but the target object requires an activate transaction. @version $Revision: 1.1 $ */ public class TransactionRequiredException extends RemoteException { /** Creates new <code>TransactionRequiredException</code> without detail message. */ public TransactionRequiredException() { } /** Constructs an <code>TransactionRequiredException</code> with the specified detail message. @param msg the detail message. */ public TransactionRequiredException(String msg) { super(msg); } } 1.1 jboss-j2ee/src/main/javax/transaction/TransactionRolledbackException.java Index: TransactionRolledbackException.java =================================================================== /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.transaction; import java.rmi.RemoteException; /** This exception indicates that the transaction associated with processing of the request has been rolled back, or marked to roll back. Thus the requested operation either could not be performed or was not performed because further computation on behalf of the transaction would be fruitless @version $Revision: 1.1 $ */ public class TransactionRolledbackException extends RemoteException { /** Creates new <code>TransactionRolledbackException</code> without detail message. */ public TransactionRolledbackException() { } /** Constructs an <code>TransactionRolledbackException</code> with the specified detail message. @param msg the detail message. */ public TransactionRolledbackException(String msg) { super(msg); } } _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development