private void handleException(Throwable functionException, final Function fn, final FunctionContext cx, final ResultSender sender, DM dm){ FunctionStats stats = FunctionStats.getFunctionStats(fn.getId(), dm .getSystem()); if (logger.isDebugEnabled()) { logger.debug("Exception occured on local node while executing Function: {}", fn.getId(), functionException); } stats.endFunctionExecutionWithException(fn.hasResult()); if (fn.hasResult()) { if (waitOnException || forwardExceptions) { sender.lastResult(functionException); } else { ((InternalResultSender)sender).setException(functionException); } } else { logger.warn(LocalizedMessage.create( LocalizedStrings.FunctionService_EXCEPTION_ON_LOCAL_NODE), functionException); } } }
public void run() { executeFunctionLocally(fn, cx, sender, newDM); if (!sender.isLastResultReceived() && fn.hasResult()) { sender.setException(new FunctionException(LocalizedStrings .ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toLocalizedString(fn.getId()))); } } });
public void run() { executeFunctionLocally(fn, cx, sender, newDM); if (!((InternalResultSender)sender).isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId()))); } } });
public void run() { executeFunctionLocally(fn, cx, sender, newDM); if (!sender.isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId()))); } } });
public void run() { executeFunctionLocally(fn, cx, sender, newDM); if (!sender.isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId()))); } } });
public final void executeFunctionOnLocalNode(final Function fn, final FunctionContext cx, final InternalResultSender sender, DM dm, final TXStateInterface tx) { if (dm instanceof DistributionManager && tx == null) { final DistributionManager newDM = (DistributionManager)dm; newDM.getFunctionExcecutor().execute(new Runnable() { public void run() { executeFunctionLocally(fn, cx, sender, newDM); if (!sender.isLastResultReceived() && fn.hasResult()) { sender.setException(new FunctionException(LocalizedStrings .ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toLocalizedString(fn.getId()))); } } }); } else { executeFunctionLocally(fn, cx, sender, dm); if (!sender.isLastResultReceived() && fn.hasResult()) { sender.setException(new FunctionException(LocalizedStrings .ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toLocalizedString(fn.getId()))); } } }
public final void executeFunctionOnLocalNode(final Function fn, final FunctionContext cx, final ResultSender sender, DM dm, final boolean isTx) { if (dm instanceof DistributionManager && !isTx) { final DistributionManager newDM = (DistributionManager)dm; newDM.getFunctionExcecutor().execute(new Runnable() { public void run() { executeFunctionLocally(fn, cx, sender, newDM); if (!((InternalResultSender)sender).isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId()))); } } }); } else { executeFunctionLocally(fn, cx, sender, dm); if (!((InternalResultSender)sender).isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId()))); } } }
if (!sender.isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId()))); if (!sender.isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId())));
if (!sender.isLastResultReceived() && fn.hasResult()) { ((InternalResultSender)sender) .setException(new FunctionException( LocalizedStrings.ExecuteFunction_THE_FUNCTION_0_DID_NOT_SENT_LAST_RESULT .toString(fn.getId())));
private void handleException(Throwable functionException, final Function fn, final FunctionContext cx, final InternalResultSender sender, DM dm) { FunctionStats stats = FunctionStats.getFunctionStats(fn.getId(), dm .getSystem()); LogWriterI18n logger = dm.getLoggerI18n(); if (logger.fineEnabled()) { logger.fine( "Exception occured on local node while executing Function: " + fn.getId(), functionException); } stats.endFunctionExecutionWithException(fn.hasResult()); if (fn.hasResult()) { if (waitOnException || forwardExceptions) { sender.lastResult(functionException); } else { sender.setException(functionException); } } else { if (logger.warningEnabled()) { logger.warning( LocalizedStrings.FunctionService_EXCEPTION_ON_LOCAL_NODE, functionException); } } } }