use of org.jboss.narayana.blacktie.jatmibroker.core.tx.TransactionImpl in project narayana by jbosstm.
the class JtsTransactionImple method resume.
/**
* Associated a transaction with the callers thread
*
* @param ior IOR for the corresponding OTS transaction, must not be null
* @param control
*
* @throws SystemException
* @throws IllegalStateException
* @throws InvalidTransactionException
* @throws ConfigurationException
* @throws TransactionException
*/
public static void resume(String ior) throws InvalidTransactionException, IllegalStateException, SystemException, ConfigurationException, TransactionException {
log.debug("resume control");
if (hasTransactionManager()) {
Transaction tx = controlToTx(ior);
tm.resume(tx);
} else {
TransactionImpl transaction = new TransactionImpl(ior);
TransactionImpl.resume(transaction);
}
}
use of org.jboss.narayana.blacktie.jatmibroker.core.tx.TransactionImpl in project narayana by jbosstm.
the class JtsTransactionImple method getTransactionIOR.
/**
* If the current transaction represents an OTS transaction then return it IOR
*
* @return the IOR or null if the current transaction is not an OTS transaction
* @throws NamingException
* @throws org.omg.CORBA.SystemException
* @throws SystemException
* @throws Unavailable
*/
public static String getTransactionIOR() throws org.omg.CORBA.SystemException, SystemException, Unavailable {
log.debug("getTransactionIOR");
TransactionImpl curr = TransactionImpl.current();
if (curr != null) {
log.debug("have JtsTransactionImple");
return curr.getControlIOR();
} else if (hasTransaction()) {
log.debug("have tx mgr");
Transaction tx = tm.getTransaction();
log.debug("have arjuna tx");
TransactionImple atx = (TransactionImple) tx;
ControlWrapper cw = atx.getControlWrapper();
log.debug("lookup control");
Control c = cw.get_control();
String ior = ORBManager.getORB().orb().object_to_string(c);
log.debug("getTransactionIOR: ior: " + ior);
return ior;
} else {
return null;
}
}
Aggregations