|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.arjuna.ats.jts.extensions.AtomicTransaction
Similar to CosTransactions::Current. However, this class does transaction scoping, so if an instance is garbage collected and the transaction is still running, it will be rolled back automatically. It also adds some convenience routines which Current does not do.
Field Summary | |
protected com.arjuna.ats.internal.jts.ControlWrapper |
_theAction
|
protected org.omg.CosTransactions.Status |
_theStatus
|
protected int |
_timeout
|
static int |
NESTED
|
static int |
TOP_LEVEL
The types of transactions which can be created. |
Constructor Summary | |
|
AtomicTransaction()
Create a new transaction. |
protected |
AtomicTransaction(com.arjuna.ats.internal.jts.ControlWrapper tx)
|
Method Summary | |
void |
begin()
Start the transaction. |
void |
commit(boolean report_heuristics)
|
org.omg.CosTransactions.Control |
control()
|
boolean |
equals(java.lang.Object obj)
|
void |
finalize()
|
org.omg.CosTransactions.Status |
get_status()
|
int |
get_timeout()
|
java.lang.String |
get_transaction_name()
|
org.omg.CosTransactions.PropagationContext |
get_txcontext()
|
Uid |
get_uid()
|
protected org.omg.CosTransactions.Status |
getStatus()
|
int |
getTimeout()
|
int |
hashCode()
|
org.omg.CosTransactions.RecoveryCoordinator |
registerResource(org.omg.CosTransactions.Resource r)
Register the specified resource with this transaction. |
void |
registerSubtranAware(org.omg.CosTransactions.SubtransactionAwareResource r)
Register the specified subtransaction aware resource with this transaction. |
void |
registerSynchronization(org.omg.CosTransactions.Synchronization sync)
Register the specified synchronization with this transaction. |
void |
resume()
Resume this transaction. |
void |
rollback()
|
void |
rollbackOnly()
Allow action commit to be supressed. |
void |
set_timeout(int seconds)
Set the transaction timeout. |
void |
suspend()
Suspend this transaction from the current thread. |
protected boolean |
validTransaction()
If this transaction current? Assume we have checked that we are actually a transaction! If not valid then abort this transaction here. |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TOP_LEVEL
public static final int NESTED
protected com.arjuna.ats.internal.jts.ControlWrapper _theAction
protected org.omg.CosTransactions.Status _theStatus
protected int _timeout
Constructor Detail |
public AtomicTransaction()
protected AtomicTransaction(com.arjuna.ats.internal.jts.ControlWrapper tx)
Method Detail |
public void finalize()
public java.lang.String get_transaction_name() throws org.omg.CORBA.SystemException
org.omg.CORBA.SystemException
public void begin() throws org.omg.CosTransactions.SubtransactionsUnavailable, org.omg.CORBA.SystemException
org.omg.CosTransactions.SubtransactionsUnavailable
- if subtransactions have been disabled, and the invoking
thread already has a transaction associated with it.
org.omg.CORBA.INVALID_TRANSACTION
- if the transaction has already begun or has completed.
org.omg.CORBA.SystemException
public void commit(boolean report_heuristics) throws org.omg.CosTransactions.NoTransaction, org.omg.CosTransactions.HeuristicMixed, org.omg.CosTransactions.HeuristicHazard, org.omg.CosTransactions.WrongTransaction, org.omg.CORBA.SystemException
org.omg.CosTransactions.NoTransaction
org.omg.CosTransactions.HeuristicMixed
org.omg.CosTransactions.HeuristicHazard
org.omg.CosTransactions.WrongTransaction
org.omg.CORBA.SystemException
public void rollback() throws org.omg.CosTransactions.NoTransaction, org.omg.CosTransactions.WrongTransaction, org.omg.CORBA.SystemException
org.omg.CosTransactions.NoTransaction
org.omg.CosTransactions.WrongTransaction
org.omg.CORBA.SystemException
public void set_timeout(int seconds) throws org.omg.CORBA.SystemException
org.omg.CORBA.SystemException
public int get_timeout() throws org.omg.CORBA.SystemException
org.omg.CORBA.SystemException
public int getTimeout() throws org.omg.CORBA.SystemException
org.omg.CORBA.SystemException
public org.omg.CosTransactions.PropagationContext get_txcontext() throws org.omg.CosTransactions.Inactive, org.omg.CORBA.SystemException
org.omg.CosTransactions.Inactive
- if the current transaction is no longer in the active
phase.
org.omg.CORBA.SystemException
public org.omg.CosTransactions.RecoveryCoordinator registerResource(org.omg.CosTransactions.Resource r) throws org.omg.CosTransactions.Inactive, org.omg.CORBA.SystemException
org.omg.CosTransactions.Inactive
- if the current transaction is no longer in the active
phase.
org.omg.CORBA.SystemException
public void registerSubtranAware(org.omg.CosTransactions.SubtransactionAwareResource r) throws org.omg.CosTransactions.Inactive, org.omg.CosTransactions.NotSubtransaction, org.omg.CORBA.SystemException
org.omg.CosTransactions.Inactive
- if this transaction is no longer in the active phase.
org.omg.CosTransactions.NotSubtransaction
- if this transaction is not a subtransaction.
org.omg.CORBA.SystemException
public void registerSynchronization(org.omg.CosTransactions.Synchronization sync) throws org.omg.CosTransactions.Inactive, org.omg.CosTransactions.SynchronizationUnavailable, org.omg.CORBA.SystemException
org.omg.CosTransactions.Inactive
- if this transaction is no longer in the active phase.
org.omg.CosTransactions.SynchronizationUnavailable
- if this transaction it not a top-level transaction.
org.omg.CORBA.SystemException
public org.omg.CosTransactions.Control control() throws org.omg.CosTransactions.NoTransaction, org.omg.CORBA.SystemException
org.omg.CosTransactions.NoTransaction
org.omg.CORBA.SystemException
public boolean equals(java.lang.Object obj)
public void suspend() throws org.omg.CosTransactions.NoTransaction, org.omg.CosTransactions.WrongTransaction, org.omg.CORBA.SystemException
org.omg.CosTransactions.NoTransaction
- if there is no current transaction.
org.omg.CORBA.WRONG_TRANSACTION
- if the transaction associated with the current thread is
different from this thread.
org.omg.CosTransactions.WrongTransaction
org.omg.CORBA.SystemException
public void resume() throws org.omg.CosTransactions.InvalidControl, org.omg.CORBA.SystemException
org.omg.CosTransactions.InvalidControl
- if this transaction is invalid.
org.omg.CORBA.SystemException
public org.omg.CosTransactions.Status get_status() throws org.omg.CORBA.SystemException
org.omg.CORBA.SystemException
public void rollbackOnly() throws org.omg.CORBA.SystemException, org.omg.CosTransactions.NoTransaction
org.omg.CORBA.SystemException
org.omg.CosTransactions.NoTransaction
public int hashCode()
public Uid get_uid()
protected final boolean validTransaction()
protected final org.omg.CosTransactions.Status getStatus()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |