private void compile(TerminationHandler terminationHandler) { OScope oscope = _structureStack.topScope(); oscope.terminationHandler = new OTerminationHandler(_oprocess, oscope); oscope.terminationHandler.name = "__terminationHandler:" + oscope.name; oscope.terminationHandler.debugInfo = createDebugInfo(terminationHandler, null); if (terminationHandler == null) { oscope.terminationHandler.activity = createDefaultCompensateActivity(null, "Auto-generated 'compensate all' pseudo-activity for default termination handler on " + oscope.toString()); } else { _recoveryContextStack.push(oscope); try { oscope.terminationHandler.activity = compile(terminationHandler.getActivity()); } finally { _recoveryContextStack.pop(); } } }
private void compile(CompensationHandler compensationHandler) { OScope oscope = _structureStack.topScope(); oscope.compensationHandler = new OCompensationHandler(_oprocess, oscope); oscope.compensationHandler.name = "__compenationHandler_" + oscope.name; oscope.compensationHandler.debugInfo = createDebugInfo(compensationHandler, null); if (compensationHandler == null) { oscope.compensationHandler.activity = createDefaultCompensateActivity(compensationHandler, "Auto-generated 'compensate all' pseudo-activity for default compensation handler on " + oscope.toString()); } else { _recoveryContextStack.push(oscope); try { oscope.compensationHandler.activity = compile(compensationHandler.getActivity()); } finally { _recoveryContextStack.pop(); } } }
rethrow.name = "__defaultFaultHandler_rethrow:" + oscope.name; rethrow.debugInfo = createDebugInfo(fh, "Auto-generated re-throw activity."); sequence.sequence.add(createDefaultCompensateActivity(fh, "Default compensation handler for " + oscope)); sequence.sequence.add(rethrow);