return _local.get_uid().equals(wrapper.get_uid()); } else if (_control == null) { return false; } else if (wrapper.isLocal()) { _uid = computeUid(); return _uid.equals(wrapper.get_uid()); } catch (Exception e) { return false; _coordinator = computeCoordinator(); return _coordinator.is_same_transaction(wrapper.get_coordinator()); } catch (Exception e) { return false;
private static ControlWrapper createControlWrapper(String ior) { org.omg.CORBA.Object obj = ORBManager.getORB().orb().string_to_object(ior); Control control = org.omg.CosTransactions.ControlHelper.narrow(obj); if (control == null) log.warn("createProxy: ior not a control"); return new ControlWrapper(control); }
/** * @return the org.omg.CosTransactions.Control reference to this * transaction. */ public Control control () throws NoTransaction, SystemException { if (_theAction == null) { throw new NoTransaction(); } else { try { return _theAction.get_control(); } catch (Unavailable ex) { throw new NoTransaction(); } } }
public final Xid get_xid (boolean branch) throws SystemException { ControlImple controlImple = _theAction.getImple(); if (controlImple != null) { return XidUtils.getXid(controlImple.get_uid(), branch); } else { return XidUtils.getXid(_theAction.getControl(), branch); } } }
public void resumeWrapper (ControlWrapper which) throws InvalidControl, SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("CurrentImple::resumeWrapper ( " + which + " )"); } if (which != null) { /* * If this is a local transaction and we haven't zero-ed the transaction * reference then resume it. Otherwise go with the Control. */ ArjunaTransactionImple tx = ((which.getImple() == null) ? null : which.getImple().getImplHandle()); if (which.isLocal() && (tx != null)) resumeImple(which.getImple()); else resume(which.getControl()); } else { resumeImple(null); } }
if (c.isLocal() && isLocal()) return c.getImple().equals(_controlImpl); myCoord = get_coordinator();
return _theAction.get_coordinator().get_txcontext();
valid = _theAction.equals(currentTransaction); String currentTransactionName = currentTransaction.get_transaction_name(); _theAction.rollback();
action.determineLocality(); if (action.isLocal()) ThreadActionData.pushAction(action.getImple().getImplHandle());
public Uid get_uid () { return _theAction.get_uid(); }
currentAction = new ControlWrapper( OTSImpleManager.factory().createLocal(get_timeout())); else currentAction = new ControlWrapper( OTSImpleManager.get_factory().create(get_timeout())); currentAction = currentAction.create_subtransaction();
public final Xid getXid () { try { ServerTransaction tx = (ServerTransaction) super._theAction.getImple().getImplHandle(); return tx.getXid(); } catch (Exception ex) { ex.printStackTrace(); } return null; }
OTSManager.destroyControl(ctx.getControl()); ctx = null;
_theAction.commit(report_heuristics);
public boolean equals (Object obj) { if (obj == null) return false; if (obj == this) return true; if (obj instanceof AtomicTransaction) { /* * If we can't get either coordinator to compare, then assume * transactions are different. */ try { AtomicTransaction tx = (AtomicTransaction) obj; ControlWrapper txControl = tx._theAction; if ((_theAction == null) && (txControl == null)) return true; else return _theAction.equals(txControl); } catch (Exception e) { } } return false; }
return _theAction.get_coordinator().get_txcontext();
public void resumeWrapper (ControlWrapper which) throws InvalidControl, SystemException { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "CurrentImple::resumeWrapper ( " + which + " )"); } if (which != null) { /* * If this is a local transaction and we haven't zero-ed the transaction * reference then resume it. Otherwise go with the Control. */ ArjunaTransactionImple tx = ((which.getImple() == null) ? null : which.getImple().getImplHandle()); if (which.isLocal() && (tx != null)) resumeImple(which.getImple()); else resume(which.getControl()); } else { resumeImple(null); } }
if (c.isLocal() && isLocal()) return c.getImple().equals(_controlImpl); myCoord = get_coordinator();
valid = _theAction.equals(currentTransaction); String currentTransactionName = currentTransaction.get_transaction_name(); _theAction.rollback();
action.determineLocality(); if (action.isLocal()) ThreadActionData.pushAction(action.getImple().getImplHandle());