public final String getChildren (int depth) { String children = ""; synchronized (_children) { for(ServerNestedAction child : _children) { children += "\n"; for (int i = 0; i < depth; i++) children += " "; children += child.get_uid(); children += child.getChildren(depth+1); } } return children; }
private final String hierarchytoString(ServerTopLevelAction action) { String hier = "InterposedHierarchy:"; if (action != null) { hier += action.get_uid(); List<ServerNestedAction> children = action.getChildren(); synchronized (children) { for(ServerNestedAction child : children) { hier += "\n"+child.get_uid(); hier += child.getChildren(2); } } } else hier += "EMPTY"; return hier; }
public final boolean removeChild (ServerNestedAction c) { c.setParentHandle(null); return _children.remove(c); }
_resourceRef = getReference(); if (!(_valid = registerResource(realCoordinator))) {
protected synchronized void destroyResource () { if (!_destroyed) { try { if (Interposition.destroy(get_uid())) _destroyed = true; } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_generror("ServerTopLevelAction.destroyResource", e); } try { if (_theResource != null) { ORBManager.getPOA().shutdownObject(_theResource); _theResource = null; } } catch (Exception e) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_generror("ServerTopLevelAction.destroyResource", e); } } tidyup(); }
protected final synchronized void destroyResource () { if (!_destroyed) { _destroyed = true; if (_parent != null) { /* * Now try to garbage collect this resource. Since it was * registered as a subtranaware resource it won't get called * again. */ if (!_parent.removeChild(this)) { jtsLogger.i18NLogger.warn_orbspecific_interposition_resources_arjuna_childerror( get_uid(), _parent.get_uid()); } } if (_theResource != null) { ORBManager.getPOA().shutdownObject(_theResource); _theResource = null; } } tidyup(); }
protected final synchronized ServerTopLevelAction present (Uid actUid) { if(_head == null) { return null; } for(ServerTopLevelAction action : _head) { if(actUid.equals(action.get_uid())) { return action; } } return null; }
public final ServerNestedAction getChild (Uid actUid) { synchronized (_children) { for(ServerNestedAction action : _children) { if(actUid.equals(action.get_uid())) { return action; } } } return null; }
public void forget () throws SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ServerTopLevelAction::forget for " + _theUid); } boolean forgot = true; if (_theControl != null) forgot = _theControl.forgetHeuristics(); destroyResource(); // causes the removal of the transaction state. if (!forgot) throw new BAD_OPERATION(); }
public void commit_subtransaction (Coordinator parent) throws SystemException { if (jtsLogger.logger.isTraceEnabled()) { jtsLogger.logger.trace("ServerStrictNestedAction::commit_subtransaction : " + _theUid); } try { super.commit_subtransaction(parent); /* * Now register a resource with our parent if required. */ if (super._parent != null) super._parent.interposeResource(); } catch (SystemException e) { if (super._parent != null) super._parent.interposeResource(); throw e; } }
private final String hierarchytoString(ServerTopLevelAction action) { String hier = "InterposedHierarchy:"; if (action != null) { hier += action.get_uid(); List<ServerNestedAction> children = action.getChildren(); synchronized (children) { for(ServerNestedAction child : children) { hier += "\n"+child.get_uid(); hier += child.getChildren(2); } } } else hier += "EMPTY"; return hier; }
public final String getChildren (int depth) { String children = ""; synchronized (_children) { for (ServerNestedAction child : _children) { children += "\n"; for (int i = 0; i < depth; i++) children += " "; children += child.get_uid(); children += child.getChildren(depth + 1); } } return children; }
_resourceRef = getReference(); if (!(_valid = registerResource(realCoordinator)))
public final boolean addChild (ServerNestedAction c) { if (_children.add(c)) { c.setParentHandle(this); return true; } return false; }
protected final synchronized ServerTopLevelAction present (Uid actUid) { if(_head == null) { return null; } for(ServerTopLevelAction action : _head) { if(actUid.equals(action.get_uid())) { return action; } } return null; }
public final ServerNestedAction getChild (Uid actUid) { synchronized (_children) { for (ServerNestedAction action : _children) { if (actUid.equals(action.get_uid())) { return action; } } } return null; }
public void forget () throws SystemException { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ServerTopLevelAction::forget for "+_theUid); } boolean forgot = true; if (_theControl != null) forgot = _theControl.forgetHeuristics(); destroyResource(); // causes the removal of the transaction state. if (!forgot) throw new BAD_OPERATION(); }
public void commit_subtransaction (Coordinator parent) throws SystemException { if (jtsLogger.logger.isDebugEnabled()) { jtsLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, com.arjuna.ats.jts.logging.FacilityCode.FAC_OTS, "ServerStrictNestedAction::commit_subtransaction : "+_theUid); } try { super.commit_subtransaction(parent); /* * Now register a resource with our parent if required. */ if (super._parent != null) super._parent.interposeResource(); } catch (SystemException e) { if (super._parent != null) super._parent.interposeResource(); throw e; } }
public final boolean addChild (ServerNestedAction c) { if (_children.add(c)) { c.setParentHandle(this); return true; } return false; }
public final boolean removeChild (ServerNestedAction c) { c.setParentHandle(null); return _children.remove(c); }