com.metamatrix.console.ui.views.properties
Class FakeUserTransaction

java.lang.Object
  extended by com.metamatrix.console.ui.views.properties.FakeUserTransaction
All Implemented Interfaces:
UserTransaction

public class FakeUserTransaction
extends java.lang.Object
implements UserTransaction


Constructor Summary
FakeUserTransaction()
           
 
Method Summary
 void begin()
          Create a new transaction and associate it with this object.
 void commit()
          Complete the transaction associated with this object.
 java.lang.Object getSource()
          Return the (optional) reference to the object that is considered the source of the transaction represented by this object.
 int getStatus()
          Obtain the status of the transaction represented by this object.
 void rollback()
          Roll back the transaction associated with this object.
 void setRollbackOnly()
          Modify the transaction associated with this object such that the only possible outcome of the transaction is to roll back the transaction.
 void setTransactionTimeout(int p0)
          Modify the value of the timeout value that is associated with the transactions represented by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeUserTransaction

public FakeUserTransaction()
Method Detail

begin

public void begin()
           throws TransactionException
Description copied from interface: UserTransaction
Create a new transaction and associate it with this object.

Specified by:
begin in interface UserTransaction
Throws:
TransactionNotSupportedException - if the current thread is already associated with a transaction and the manager does not support nested system transactions.
TransactionException

commit

public void commit()
            throws TransactionException
Description copied from interface: UserTransaction
Complete the transaction associated with this object. When this method completes, the thread becomes associated with no transaction.

Specified by:
commit in interface UserTransaction
Throws:
TransactionException

getSource

public java.lang.Object getSource()
                           throws TransactionException
Description copied from interface: UserTransaction
Return the (optional) reference to the object that is considered the source of the transaction represented by this object. This is used, for example, to set the source of all events occuring within this transaction.

Specified by:
getSource in interface UserTransaction
Returns:
the source object, which may be null
Throws:
TransactionException

getStatus

public int getStatus()
              throws TransactionException
Description copied from interface: UserTransaction
Obtain the status of the transaction represented by this object.

Specified by:
getStatus in interface UserTransaction
Returns:
The transaction status.
Throws:
TransactionException

rollback

public void rollback()
              throws TransactionException
Description copied from interface: UserTransaction
Roll back the transaction associated with this object. When this method completes, the thread becomes associated with no transaction.

Specified by:
rollback in interface UserTransaction
Throws:
TransactionException

setRollbackOnly

public void setRollbackOnly()
                     throws TransactionException
Description copied from interface: UserTransaction
Modify the transaction associated with this object such that the only possible outcome of the transaction is to roll back the transaction.

Specified by:
setRollbackOnly in interface UserTransaction
Throws:
TransactionException

setTransactionTimeout

public void setTransactionTimeout(int p0)
                           throws TransactionException
Description copied from interface: UserTransaction
Modify the value of the timeout value that is associated with the transactions represented by this object. If an application has not called this method, the transaction service uses some default value for the transaction timeout.

Specified by:
setTransactionTimeout in interface UserTransaction
Parameters:
p0 - The value of the timeout in seconds. If the value is zero, the transaction service restores the default value.
Throws:
TransactionException


Copyright © 2009. All Rights Reserved.