public class CurrentImpl extends LocalObject implements org.omg.CosTransactions.Current
| Modifier and Type | Method and Description |
|---|---|
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() |
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.
|
_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_connectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_overridepublic void begin()
throws INVALID_TRANSACTION,
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.INVALID_TRANSACTION - The transaction could not be begun as the
current thread of control has pending non-transactional work.SystemException - The operation failed.public void begin(int time_out)
throws INVALID_TRANSACTION,
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.INVALID_TRANSACTION - The transaction could not be begun as the
current thread of control has pending non-transactional work.SystemException - The operation failed.public void commit(boolean reportHeuristics)
throws NO_PERMISSION,
INVALID_TRANSACTION,
TRANSACTION_ROLLEDBACK,
org.omg.CosTransactions.NoTransaction,
org.omg.CosTransactions.HeuristicHazard,
org.omg.CosTransactions.HeuristicMixed,
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.INVALID_TRANSACTION - The current transaction has outstanding
work and the Transaction Service is "checked".NO_PERMISSION - The caller is not allowed to commit the
transaction.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.SystemException - The operation failed.public void rollback()
throws org.omg.CosTransactions.NoTransaction,
INVALID_TRANSACTION,
NO_PERMISSION,
TRANSACTION_ROLLEDBACK,
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.INVALID_TRANSACTION - The current transaction has outstanding
work and the Transaction Service is "checked".NO_PERMISSION - The caller is not allowed to roll the
transaction back.TRANSACTION_ROLLEDBACK - The transaction has already been rolled
back.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 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 TRANSACTION_ROLLEDBACK
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,
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.INVALID_TRANSACTION - The transaction could not be begun as the
current thread of control has pending non-transactional work.public String[] _ids()
Copyright © 2019. All rights reserved.