|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omg.CORBA.LocalObject
com.sun.jts.CosTransactions.CurrentImpl
public class CurrentImpl
The CurrentImpl class is our implementation of the standard Current interface. It provides operations that enable the demarcation of a transaction's scope. These operations are specified in pseudo-IDL. The CurrentImpl ensures that the CurrentTransaction class is set up when the CurrentImpl is created. As an instance of this class may be accessed from multiple threads within a process, serialisation for thread-safety is necessary in the implementation.
,
Serialized Form| Method Summary | |
|---|---|
java.lang.String[] |
_ids()
|
void |
begin()
Creates a new Control object, containing new Terminator and Coordinator objects. |
void |
begin(int time_out)
Creates a new Control object, containing new Terminator and Coordinator objects. |
void |
commit(boolean reportHeuristics)
Completes the current transaction. |
org.omg.CosTransactions.Control |
get_control()
Returns the current ControlImpl object. |
org.omg.CosTransactions.Status |
get_status()
Returns the status of the current transaction. |
int |
get_timeout()
|
java.lang.String |
get_transaction_name()
Returns a printable string representing the current transaction. |
void |
resume(org.omg.CosTransactions.Control control)
Re-associates the given Control to the calling thread. |
void |
rollback_only()
Marks the current transaction such that is cannot be committed and only rolled back. |
void |
rollback()
Rolls back the changes performed under the current transaction. |
void |
set_timeout(int timeout)
Sets the timeout value to be used for all subsequent transactions. |
org.omg.CosTransactions.Control |
suspend()
Disassociates the current ControlImpl from the calling thread. |
| 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 |
| Method Detail |
|---|
public void begin()
throws org.omg.CORBA.INVALID_TRANSACTION,
org.omg.CORBA.SystemException,
org.omg.CosTransactions.SubtransactionsUnavailable
The current timeout value is passed to the Coordinator.
The Control object is made the current one for the thread on which this method was invoked. If there is already a current Control the existing Control that represents the parent transaction is stacked behind the new one, which becomes the current one.
-
org.omg.CosTransactions.SubtransactionsUnavailable - A subtransaction cannot be begun,
either because the Transaction Service does not support nested transactions
or because the current transaction is completing.
org.omg.CORBA.INVALID_TRANSACTION - The transaction could not be begun as the
current thread of control has pending non-transactional work.
org.omg.CORBA.SystemException - The operation failed.
public void begin(int time_out)
throws org.omg.CORBA.INVALID_TRANSACTION,
org.omg.CORBA.SystemException,
org.omg.CosTransactions.SubtransactionsUnavailable
Input parameter timeout value is passed to the Coordinator.
The Control object is made the current one for the thread on which this method was invoked. If there is already a current Control the existing Control that represents the parent transaction is stacked behind the new one, which becomes the current one.
-
org.omg.CosTransactions.SubtransactionsUnavailable - A subtransaction cannot be begun,
either because the Transaction Service does not support nested transactions
or because the current transaction is completing.
org.omg.CORBA.INVALID_TRANSACTION - The transaction could not be begun as the
current thread of control has pending non-transactional work.
org.omg.CORBA.SystemException - The operation failed.
public void commit(boolean reportHeuristics)
throws org.omg.CORBA.NO_PERMISSION,
org.omg.CORBA.INVALID_TRANSACTION,
org.omg.CORBA.TRANSACTION_ROLLEDBACK,
org.omg.CosTransactions.NoTransaction,
org.omg.CosTransactions.HeuristicHazard,
org.omg.CosTransactions.HeuristicMixed,
org.omg.CORBA.SystemException
This operation can only be called if there is a Terminator object available.
reportHeuristics - Indicates that heuristic exceptions should be
passed back to the caller.
org.omg.CosTransactions.NoTransaction - There is no current transaction to commit.
org.omg.CORBA.INVALID_TRANSACTION - The current transaction has outstanding
work and the Transaction Service is "checked".
org.omg.CORBA.NO_PERMISSION - The caller is not allowed to commit the
transaction.
org.omg.CORBA.TRANSACTION_ROLLEDBACK - The transaction could not be committed,
and has been rolled back.
org.omg.CosTransactions.HeuristicHazard - Heuristic action may have been taken by a
participant in the transaction.
org.omg.CosTransactions.HeuristicMixed - Heuristic action has been taken by a participant
in the transaction.
org.omg.CORBA.SystemException - The operation failed.
public void rollback()
throws org.omg.CosTransactions.NoTransaction,
org.omg.CORBA.INVALID_TRANSACTION,
org.omg.CORBA.NO_PERMISSION,
org.omg.CORBA.TRANSACTION_ROLLEDBACK,
org.omg.CORBA.SystemException
This operation can only be called if there is a Terminator object available.
-
org.omg.CosTransactions.NoTransaction - There is no current transaction to rollback.
org.omg.CORBA.INVALID_TRANSACTION - The current transaction has outstanding
work and the Transaction Service is "checked".
org.omg.CORBA.NO_PERMISSION - The caller is not allowed to roll the
transaction back.
org.omg.CORBA.TRANSACTION_ROLLEDBACK - The transaction has already been rolled
back.
org.omg.CORBA.SystemException - The operation failed.
public void rollback_only()
throws org.omg.CosTransactions.NoTransaction
-
org.omg.CosTransactions.NoTransaction - There is no current transaction to mark rollback-
only.public org.omg.CosTransactions.Status get_status()
-
public java.lang.String get_transaction_name()
-
public void set_timeout(int timeout)
timeout - The timeout value in seconds.public int get_timeout()
public org.omg.CosTransactions.Control get_control()
throws org.omg.CORBA.TRANSACTION_ROLLEDBACK
-
org.omg.CORBA.TRANSACTION_ROLLEDBACK - The current transaction has been rolled
back.public org.omg.CosTransactions.Control suspend()
-
public void resume(org.omg.CosTransactions.Control control)
throws org.omg.CosTransactions.InvalidControl,
org.omg.CORBA.INVALID_TRANSACTION
If there is already a current ControlImpl, it is replaced as the current one.
control - The Control object to be made current.
org.omg.CosTransactions.InvalidControl - The Control object passed as a parameter is
not valid. This may be because the transaction it represents has
already completed, or because the object is of the wrong type.
org.omg.CORBA.INVALID_TRANSACTION - The transaction could not be begun as the
current thread of control has pending non-transactional work.public java.lang.String[] _ids()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||