org.jacorb.transaction
Class TransactionCurrentImpl

java.lang.Object
  extended by org.omg.CORBA.LocalObject
      extended by org.jacorb.transaction.TransactionCurrentImpl
All Implemented Interfaces:
Serializable, Current, CurrentOperations, LocalInterface, Object, IDLEntity

public class TransactionCurrentImpl
extends LocalObject
implements org.omg.CosTransactions.Current

This class represents the transaction current. It is a very simple implementation wich mostly maps to the methods in the control.

Version:
$Id: TransactionCurrentImpl.java,v 1.20 2011-05-10 15:40:41 nick.cross Exp $
Author:
Nicolas Noffke, Vladimir Mencl
See Also:
Serialized Form

Constructor Summary
TransactionCurrentImpl()
          Creates a non-functional current.
TransactionCurrentImpl(org.jacorb.orb.ORB orb, int slot_id)
           
 
Method Summary
 void begin()
          Start a new transaction.
 void commit(boolean report_heuristics)
           
 org.omg.CosTransactions.Control get_control()
          This and the following method should actually throw NoTransaction, but that is against the spec.
 org.omg.CosTransactions.Status get_status()
           
 String get_transaction_name()
           
static org.omg.CosTransactions.Control getControl(ORB orb)
          This method is a convenience method for the server programmer the exctract the Control from the PICurrent.
 void resume(org.omg.CosTransactions.Control which)
           
 void rollback_only()
           
 void rollback()
           
 void set_timeout(int seconds)
           
 void setCurrentThreadContext(org.omg.CosTransactions.Control control)
           
 org.omg.CosTransactions.Control suspend()
           
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_client_policy, _get_component, _get_domain_managers, _get_interface_def, _get_interface, _get_orb, _get_policy_overrides, _get_policy, _hash, _ids, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _repository_id, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, _set_policy_overrides, _validate_connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_client_policy, _get_component, _get_domain_managers, _get_interface_def, _get_interface, _get_orb, _get_policy_overrides, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _repository_id, _request, _set_policy_override, _set_policy_overrides, _validate_connection
 

Constructor Detail

TransactionCurrentImpl

public TransactionCurrentImpl(org.jacorb.orb.ORB orb,
                              int slot_id)

TransactionCurrentImpl

public TransactionCurrentImpl()
Creates a non-functional current.

Method Detail

getControl

public static org.omg.CosTransactions.Control getControl(ORB orb)
This method is a convenience method for the server programmer the exctract the Control from the PICurrent.


begin

public void begin()
           throws org.omg.CosTransactions.SubtransactionsUnavailable
Start a new transaction. The propagation context will be transfered on ALL communication (~1k extra data) from now on, until the transaction is committed or rolled back.
NOTICE: the PropagationContext might not be set up fully compliant to the Spec.

Throws:
org.omg.CosTransactions.SubtransactionsUnavailable

commit

public void commit(boolean report_heuristics)
            throws org.omg.CosTransactions.NoTransaction,
                   org.omg.CosTransactions.HeuristicMixed,
                   org.omg.CosTransactions.HeuristicHazard
Throws:
org.omg.CosTransactions.NoTransaction
org.omg.CosTransactions.HeuristicMixed
org.omg.CosTransactions.HeuristicHazard

get_control

public org.omg.CosTransactions.Control get_control()
This and the following method should actually throw NoTransaction, but that is against the spec.


get_status

public org.omg.CosTransactions.Status get_status()

get_transaction_name

public String get_transaction_name()

resume

public void resume(org.omg.CosTransactions.Control which)
            throws org.omg.CosTransactions.InvalidControl
Throws:
org.omg.CosTransactions.InvalidControl

rollback

public void rollback()
              throws org.omg.CosTransactions.NoTransaction
Throws:
org.omg.CosTransactions.NoTransaction

rollback_only

public void rollback_only()
                   throws org.omg.CosTransactions.NoTransaction
Throws:
org.omg.CosTransactions.NoTransaction

set_timeout

public void set_timeout(int seconds)

suspend

public org.omg.CosTransactions.Control suspend()

setCurrentThreadContext

public void setCurrentThreadContext(org.omg.CosTransactions.Control control)


Copyright © 2012 JacORB. All Rights Reserved.