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, Object, IDLEntity

public class TransactionCurrentImpl
extends LocalObject
implements Current

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

Author:
Nicolas Noffke, Vladimir Mencl
See Also:
Serialized Form

Constructor Summary
TransactionCurrentImpl()
          Creates a non-functional current.
TransactionCurrentImpl(ORB orb, int slot_id)
           
 
Method Summary
 void begin()
          Start a new transaction.
 void commit(boolean report_heuristics)
           
 Control get_control()
          This and the following method should actually throw NoTransaction, but that is against the spec.
 Status get_status()
           
 String get_transaction_name()
           
static Control getControl(ORB orb)
          This method is a convenience method for the server programmer the exctract the Control from the PICurrent.
 void resume(Control which)
           
 void rollback_only()
           
 void rollback()
           
 void set_timeout(int seconds)
           
 void setCurrentThreadContext(Control control)
           
 Control suspend()
           
 
Methods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, 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_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Constructor Detail

TransactionCurrentImpl

public TransactionCurrentImpl(ORB orb,
                              int slot_id)

TransactionCurrentImpl

public TransactionCurrentImpl()
Creates a non-functional current.

Method Detail

getControl

public static 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 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:
SubtransactionsUnavailable

commit

public void commit(boolean report_heuristics)
            throws NoTransaction,
                   HeuristicMixed,
                   HeuristicHazard
Throws:
NoTransaction
HeuristicMixed
HeuristicHazard

get_control

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


get_status

public Status get_status()

get_transaction_name

public String get_transaction_name()

resume

public void resume(Control which)
            throws InvalidControl
Throws:
InvalidControl

rollback

public void rollback()
              throws NoTransaction
Throws:
NoTransaction

rollback_only

public void rollback_only()
                   throws NoTransaction
Throws:
NoTransaction

set_timeout

public void set_timeout(int seconds)

suspend

public Control suspend()

setCurrentThreadContext

public void setCurrentThreadContext(Control control)


Copyright © 2015 JacORB. All rights reserved.