org.objectweb.jotm.impl.ots
Class ClientTransaction

java.lang.Object
  |
  +--org.omg.CORBA.portable.ObjectImpl
        |
        +--org.omg.CosTransactions._TransactionalObjectImplBase
              |
              +--org.objectweb.jotm.impl.ots.ClientTransaction
All Implemented Interfaces:
org.omg.CosTransactions.Current, org.omg.CORBA.Current, org.omg.CORBA.CurrentOperations, org.omg.CORBA.portable.IDLEntity, org.omg.CORBA.portable.InvokeHandler, org.omg.CORBA.Object, java.io.Serializable, org.omg.CosTransactions.TransactionalObject, org.omg.CosTransactions.TransactionalObjectOperations

public class ClientTransaction
extends org.omg.CosTransactions._TransactionalObjectImplBase
implements org.omg.CosTransactions.Current

Client Transaction is a class that implement Current. It serves as a user reference to the TransactionImpl class.

See Also:
Serialized Form

Constructor Summary
ClientTransaction()
           
 
Method Summary
 void begin()
           
 void commit(boolean report_heuristics)
           
 org.omg.CosTransactions.Control get_control()
           
 org.omg.CosTransactions.Status get_status()
           
 int get_timeout()
           
 java.lang.String get_transaction_name()
           
static TransactionImpl getOTSTransaction()
          Retrieve a transaction associated with current thread.
 void resume(org.omg.CosTransactions.Control ctrl)
           
 void rollback_only()
           
 void rollback()
           
 void set_timeout(int timeout)
           
 org.omg.CosTransactions.Control suspend()
           
 
Methods inherited from class org.omg.CosTransactions._TransactionalObjectImplBase
_ids, _invoke
 
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

ClientTransaction

public ClientTransaction()
Method Detail

begin

public void begin()
           throws org.omg.CosTransactions.SubtransactionsUnavailable
Specified by:
begin in interface org.omg.CosTransactions.Current
org.omg.CosTransactions.SubtransactionsUnavailable

commit

public void commit(boolean report_heuristics)
            throws org.omg.CosTransactions.NoTransaction,
                   org.omg.CosTransactions.HeuristicMixed,
                   org.omg.CosTransactions.HeuristicHazard
Specified by:
commit in interface org.omg.CosTransactions.Current
org.omg.CosTransactions.NoTransaction
org.omg.CosTransactions.HeuristicMixed
org.omg.CosTransactions.HeuristicHazard

rollback

public void rollback()
              throws org.omg.CosTransactions.NoTransaction
Specified by:
rollback in interface org.omg.CosTransactions.Current
org.omg.CosTransactions.NoTransaction

rollback_only

public void rollback_only()
                   throws org.omg.CosTransactions.NoTransaction
Specified by:
rollback_only in interface org.omg.CosTransactions.Current
org.omg.CosTransactions.NoTransaction

get_status

public org.omg.CosTransactions.Status get_status()
Specified by:
get_status in interface org.omg.CosTransactions.Current

get_transaction_name

public java.lang.String get_transaction_name()
Specified by:
get_transaction_name in interface org.omg.CosTransactions.Current

set_timeout

public void set_timeout(int timeout)
Specified by:
set_timeout in interface org.omg.CosTransactions.Current

get_timeout

public int get_timeout()

suspend

public org.omg.CosTransactions.Control suspend()
Specified by:
suspend in interface org.omg.CosTransactions.Current

resume

public void resume(org.omg.CosTransactions.Control ctrl)
            throws org.omg.CosTransactions.InvalidControl
Specified by:
resume in interface org.omg.CosTransactions.Current
org.omg.CosTransactions.InvalidControl

get_control

public org.omg.CosTransactions.Control get_control()
Specified by:
get_control in interface org.omg.CosTransactions.Current

getOTSTransaction

public static TransactionImpl getOTSTransaction()
                                         throws NoTransactionException
Retrieve a transaction associated with current thread. Do it by the retrieval of current CoreTransaction and creation of a new TransactionImpl TODO: Get rid of this method

NoTransactionException