public static Control createPropagatedControl (Coordinator coord) { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("TransactionFactoryImple::createPropagatedControl ( " + coord + " )"); } ControlImple proxyControl = new ControlImple(coord, null); return proxyControl.getControl(); }
protected synchronized void canDestroy () throws ActiveTransaction, ActiveThreads, BadControl, Destroyed, SystemException { canDestroy(true); }
public Coordinator get_coordinator () throws SystemException, org.omg.CosTransactions.Unavailable { if ((_transactionHandle != null) && (_theCoordinator == null)) createTransactionHandle(); if (_theCoordinator != null) return _theCoordinator; else throw new Unavailable(); }
public void finalize () throws Throwable { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ControlImple.finalize ()"); } if (!_destroyed) { try { destroy(); } catch (Exception e) { } } tidyup(); /* * Do this here rather than in tidyup so anyone else with a reference to * this control can continue to determine the status of the transaction * until the control is garbage collected. */ _theTerminator = null; _theCoordinator = null; _theUid = null; }
/** * Determine whether or not we are a local control. Only do this once since * locality is not likely to change! */ public final void determineLocality () { if (!_checkedLocality) { _controlImpl = Helper.localControl(_control); /* * Could be a proxy for a remote control, in which case we say we * are remote. */ if ((_controlImpl != null) && (_controlImpl.getImplHandle() == null)) { _theUid = _controlImpl.get_uid(); _controlImpl = null; } _checkedLocality = true; } }
_transactionHandle = cont.getImplHandle(); coord = cont.get_coordinator(); term = cont.get_terminator(); super.duplicateTransactionHandle(coord, term); _isWrapper = false; super.createTransactionHandle();
public java.util.Map<Uid, String> getSynchronizations() { if ( _controlImpl.getImplHandle() == null) return Collections.EMPTY_MAP; else return _controlImpl.getImplHandle().getSynchronizations(); }
+ get_uid()); canDestroy(); removeControl(); tidyup();
Control currentControl = controlHandle.getControl(); PropagationContext context = new PropagationContext(); int sequenceThreshold = 1; // most transactions will be top-level context.current.coord = controlHandle.get_coordinator(); context.timeout = 0; // will reset later! context.current.term = controlHandle.get_terminator(); theUid = controlHandle.get_uid().stringForm();
public Control recreate (PropagationContext ctx) throws SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("TransactionFactoryImple::recreate ()"); } return recreateLocal(ctx).getControl(); }
coord = control.get_coordinator(); jtsLogger.logger.trace("OTS::destroyControl - local transaction: " + control.get_uid()); control.destroy();
ArjunaTransactionImple tx = _controlImpl.getImplHandle(); return _controlImpl.getFinalStatus(); else return tx.get_status();
_theUid = uid; duplicateTransactionHandle(coordinator, terminator); addControl();
if ((cw == null) || (!controlHandle.equals(cw.getImple())))
/** * Create a new instance with the specified parent. */ public ControlImple (Control parentCon, ArjunaTransactionImple parentTran) { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ControlImple::ControlImple ( Control parentCon, " + ((parentTran != null) ? parentTran.get_uid() : Uid.nullUid()) + " )"); } _theTerminator = null; _theCoordinator = null; _parentControl = parentCon; _transactionHandle = new ArjunaTransactionImple(_parentControl, parentTran); _theUid = _transactionHandle.get_uid(); _transactionImpl = null; _myControl = null; _destroyed = false; /* * Pass a pointer to the control to the transaction so it knows what the * control is. We use this for transaction comparison and * thread-to-context management. */ _transactionHandle.setControlHandle(this); addControl(); }
public synchronized void destroy () throws ActiveTransaction, ActiveThreads, BadControl, Destroyed, SystemException { if (super._destroyed) throw new Destroyed(); /* * We are about to delete ourself (!) so make sure we don't using * anything on the stack after this point. This includes returning * variables. */ try { if (_isWrapper) { _transactionHandle = null; } super.destroy(); } catch (BAD_PARAM e) { // already destroyed } catch (Destroyed de) { // already destroyed } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_interposition_destfailed("ServerControl", e); } }
ControlImple tranControl = new ControlImple((Control) null, (ArjunaTransactionImple) null); int theTimeout = time_out;
_transactionHandle = cont.getImplHandle(); coord = cont.get_coordinator(); term = cont.get_terminator(); super.duplicateTransactionHandle(coord, term); _isWrapper = false; super.createTransactionHandle();
public java.util.Map<Uid, String> getSynchronizations() { if ( _controlImpl.getImplHandle() == null) return Collections.EMPTY_MAP; else return _controlImpl.getImplHandle().getSynchronizations(); }
+ get_uid()); canDestroy(); removeControl(); tidyup();