com.sun.sgs.impl.service.transaction
Interface TransactionHandle


public interface TransactionHandle

Defines an interface for managing a transaction.


Method Summary
 void commit()
          Prepares and commits the transaction associated with this handle.
 Transaction getTransaction()
          Returns the transaction associated with this handle.
 

Method Detail

getTransaction

Transaction getTransaction()
Returns the transaction associated with this handle.

Returns:
the transaction

commit

void commit()
            throws Exception
Prepares and commits the transaction associated with this handle.

If the transaction has been aborted, or when preparing a transaction participant or calling beforeCompletion on a transaction listener aborts the transaction without throwing an exception, then the exception thrown will have as its cause the value provided in the first call to abort on the transaction, if any. If the cause implements ExceptionRetryStatus, then the exception thrown will, too, and its shouldRetry method will return the value returned by calling that method on the cause. If no cause was supplied, then shouldRetry will either not implement ExceptionRetryStatus or its shouldRetry method will return false.

Throws:
TransactionNotActiveException - if the transaction has been aborted
TransactionAbortedException - if a call to prepare on a transaction participant or to beforeCompletion on a transaction listener aborts the transaction but does not throw an exception
IllegalStateException - if prepare has been called on any transaction participant and abort has not been called on the transaction, or if called from a thread that is not the thread that created the transaction
Exception - any exception thrown when calling prepare on a participant or beforeCompletion on a listener

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved