/** * On a fault, propagate to parent if any, or call into the fault handler * * @param synCtx the message at hand */ public void onFault(MessageContext synCtx) { invokeNextFaultHandler(synCtx); }
protected void informFailure(MessageContext synCtx, int errorCode, String errorMsg) { log.warn("Endpoint failure - Error Code: " + errorCode + ", Error Message: " + errorMsg); if (synCtx.getProperty(SynapseConstants.LAST_ENDPOINT) == null || synCtx.getProperty(SynapseConstants.ERROR_CODE) == null) { setErrorOnMessage(synCtx, String.valueOf(errorCode), errorMsg); } invokeNextFaultHandler(synCtx); }
/** * On a fault, propagate to parent if any, or call into the fault handler * * @param synCtx the message at hand */ public void onFault(MessageContext synCtx) { EndpointDefinition endpointDefinition = getDefinition(); if (endpointDefinition != null && endpointDefinition.getTimeoutAction() == SynapseConstants.DISCARD) { log.info("Ignoring fault handlers since the timeout action is set to DISCARD"); } else { logSetter(); invokeNextFaultHandler(synCtx); } }
protected void informFailure(MessageContext synCtx, int errorCode, String errorMsg) { Boolean isConcurrencyThrottleEnabled = (Boolean) synCtx .getProperty(SynapseConstants.SYNAPSE_CONCURRENCY_THROTTLE); if (isConcurrencyThrottleEnabled != null && isConcurrencyThrottleEnabled) { ConcurrentAccessController concurrentAccessController = (ConcurrentAccessController) synCtx .getProperty(SynapseConstants.SYNAPSE_CONCURRENT_ACCESS_CONTROLLER); int available = concurrentAccessController.incrementAndGet(); int concurrentLimit = concurrentAccessController.getLimit(); if (log.isDebugEnabled()) { log.debug("Concurrency Throttle : Connection returned" + " :: " + available + " of available of " + concurrentLimit + " connections"); } ConcurrentAccessReplicator concurrentAccessReplicator = (ConcurrentAccessReplicator) synCtx .getProperty(SynapseConstants.SYNAPSE_CONCURRENT_ACCESS_REPLICATOR); String throttleKey = (String) synCtx .getProperty(SynapseConstants.SYNAPSE_CONCURRENCY_THROTTLE_KEY); if (concurrentAccessReplicator != null) { concurrentAccessReplicator.replicate(throttleKey, true); } } if (synCtx.getProperty(SynapseConstants.LAST_ENDPOINT) == null) { setErrorOnMessage(synCtx, errorCode, errorMsg); } invokeNextFaultHandler(synCtx); }