* @throws Throwable when calling the method fails.
*/
private Object retryIfNeeded(Object proxy, Method method, Object[] args, Throwable actualException)
throws Throwable {
if ((actualException instanceof RetryableUnavailableException)) {
RetryableUnavailableException rue =
(RetryableUnavailableException) actualException;
if (BadConnectionEventListener.POOL_RECONFIGURED_ERROR_CODE.equals(rue.getErrorCode())) {
debug(" DynamicResourceReconfigurator : retryable-exception in method, retrying : " +
method.getName());
return invoke(proxy, method, args);
}
}