org.jboss.narayana.blacktie.jatmibroker.jab
Class JABTransaction

java.lang.Object
  extended by org.jboss.narayana.blacktie.jatmibroker.jab.JABTransaction

public class JABTransaction
extends Object


Field Summary
protected  org.omg.CosTransactions.Control control
           
 
Constructor Summary
JABTransaction(JABSession aJABSession, int aTimeout)
           
JABTransaction(String controlIOR)
           
 
Method Summary
 boolean addChildThread(Thread t)
          Add the specified thread to the list of threads associated with this transaction.
 void commit()
           
static JABTransaction current()
           
 boolean equals(Object obj)
           
 void finalize()
           
 org.omg.CosTransactions.Control getControl()
           
 String getControlIOR()
           
 JABSession getSession()
           
 org.omg.CosTransactions.Status getStatus()
           
 JABTransaction parent()
           
 boolean removeChildThread()
          Remove a child thread.
 boolean removeChildThread(String threadId)
          Remove the specified thread from the transaction.
static boolean resume(JABTransaction act)
          Resume transaction association on the current thread.
 void rollback_only()
           
 void rollback()
           
static JABTransaction suspend()
          Suspend the transaction association from the invoking thread.
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

control

protected org.omg.CosTransactions.Control control
Constructor Detail

JABTransaction

public JABTransaction(JABSession aJABSession,
                      int aTimeout)
               throws TransactionException,
                      NotFound,
                      CannotProceed,
                      InvalidName,
                      InvalidName,
                      AdapterInactive,
                      org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
Throws:
TransactionException
NotFound
CannotProceed
InvalidName
AdapterInactive
org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException

JABTransaction

public JABTransaction(String controlIOR)
               throws JABException,
                      org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
Throws:
JABException
org.jboss.narayana.blacktie.jatmibroker.core.conf.ConfigurationException
Method Detail

finalize

public void finalize()
              throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

getStatus

public org.omg.CosTransactions.Status getStatus()
                                         throws org.omg.CosTransactions.Unavailable
Throws:
org.omg.CosTransactions.Unavailable

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getControlIOR

public String getControlIOR()

current

public static JABTransaction current()

getControl

public org.omg.CosTransactions.Control getControl()

getSession

public JABSession getSession()

commit

public void commit()
            throws TransactionException
Throws:
TransactionException

rollback

public void rollback()
              throws TransactionException
Throws:
TransactionException

rollback_only

public void rollback_only()
                   throws TransactionException
Throws:
TransactionException

addChildThread

public final boolean addChildThread(Thread t)
Add the specified thread to the list of threads associated with this transaction.

Returns:
true if successful, false otherwise.

removeChildThread

public final boolean removeChildThread()
Remove a child thread. The current thread is removed.

Returns:
true if successful, false otherwise.

removeChildThread

public final boolean removeChildThread(String threadId)
Remove the specified thread from the transaction.

Returns:
true if successful, false otherwise.

parent

public final JABTransaction parent()

suspend

public static final JABTransaction suspend()
Suspend the transaction association from the invoking thread. When this operation returns, the thread will not be associated with a transaction.

Returns:
a handle on the current JABTransaction (if any) so that the thread can later resume association if required.

resume

public static final boolean resume(JABTransaction act)
Resume transaction association on the current thread. If the specified transaction is null, then this is the same as doing a suspend. If the current thread is associated with a transaction then that association will be lost.

Parameters:
act - the transaction to associate.
Returns:
true if association is successful, false otherwise.


Copyright © 2011. All Rights Reserved.