Source:
<code>private InputStream processExec(CallContextImpl callContext) { <START> final int DEFAULT_MAX_RETRIES = 10; <END> ErrorDisposition error = ErrorDisposition.RETRY; InputStream output = null; for (int retryCount = 0; retryCount < DEFAULT_MAX_RETRIES && error == ErrorDisposition.RETRY; retryCount++) { Throwable throwable = null; try { logger.trace("exec calling endpoint={} count={} state={}", callContext.getEndpoint().getEndpointPath(), getCallCount(), callContext.getEndpointState()); output = getEndpoint().getCaller().call( callContext.getClient(), callContext.getEndpointState(), callContext.getSessionState(), callContext.getWorkUnit() ); if (callContext.getEndpoint().allowsEndpointState()) { callContext.withEndpointState(output); } incrementCallCount(); return output; } catch(Throwable catchedThrowable) { throwable = catchedThrowable; } if (throwable != null) { if (getErrorListener() == null) { logger.error("Error while calling " + getEndpoint().getEndpointPath(), throwable); throw new RuntimeException("Error while calling " + getEndpoint().getEndpointPath(), throwable); } else { try { if (retryCount < DEFAULT_MAX_RETRIES - 1) { error = getErrorListener().processError(retryCount, throwable, callContext); } else { error = ErrorDisposition.SKIP_CALL; } } catch (Throwable throwable1) { logger.error("Error Listener failed with " , throwable1); error = ErrorDisposition.STOP_ALL_CALLS; } switch (error) { case RETRY: continue; case SKIP_CALL: if(callContext.getEndpoint().allowsEndpointState()) { callContext.withEndpointState((InputStream) null); } return output; case STOP_ALL_CALLS: getCallerThreadPoolExecutor().shutdown(); } } } } return output; }</code><technical_language>Is a reason DEFAULT_MAX_RETRIES is 10 in some callers 100 in others? constant shared implementations if declared a static final package-visible constant of IOEndpointImpl</technical_language>

Target:
private InputStream processExec(CallContextImpl callContext) { ErrorDisposition error = ErrorDisposition.RETRY; InputStream output = null; for (int retryCount = 0; retryCount < DEFAULT_MAX_RETRIES && error == ErrorDisposition.RETRY; retryCount++) { Throwable throwable = null; try { logger.trace("exec calling endpoint={} count={} state={}", callContext.getEndpoint().getEndpointPath(), getCallCount(), callContext.getEndpointState()); output = getEndpoint().getCaller().call( callContext.getClient(), callContext.getEndpointState(), callContext.getSessionState(), callContext.getWorkUnit() ); if (callContext.getEndpoint().allowsEndpointState()) { callContext.withEndpointState(output); } incrementCallCount(); return output; } catch(Throwable catchedThrowable) { throwable = catchedThrowable; } if (throwable != null) { if (getErrorListener() == null) { logger.error("No error listener set. Stop all calls. " + getEndpoint().getEndpointPath(), throwable); error = ErrorDisposition.STOP_ALL_CALLS; } else { try { if (retryCount < DEFAULT_MAX_RETRIES - 1) { error = getErrorListener().processError(retryCount, throwable, callContext); } else { error = ErrorDisposition.SKIP_CALL; } } catch (Throwable throwable1) { logger.error("Error Listener failed with " , throwable1); error = ErrorDisposition.STOP_ALL_CALLS; } switch (error) { case RETRY: continue; case SKIP_CALL: if(callContext.getEndpoint().allowsEndpointState()) { callContext.withEndpointState((InputStream) null); } return output; case STOP_ALL_CALLS: getCallerThreadPoolExecutor().shutdown(); } } } } return output; }