/** * Refresh the stub and retry the remote invocation if necessary. * <p>If not configured to refresh on connect failure, this method * simply rethrows the original exception. * @param invocation the invocation that failed * @param ex the exception raised on remote invocation * @return the result value of the new invocation, if succeeded * @throws Throwable an exception raised by the new invocation, if failed too. */ private Object handleRemoteConnectFailure(MethodInvocation invocation, Exception ex) throws Throwable { if (this.refreshStubOnConnectFailure) { if (logger.isDebugEnabled()) { logger.debug("Could not connect to RMI service [" + getJndiName() + "] - retrying", ex); } else if (logger.isInfoEnabled()) { logger.info("Could not connect to RMI service [" + getJndiName() + "] - retrying"); } return refreshAndRetry(invocation); } else { throw ex; } }
/** * Refresh the stub and retry the remote invocation if necessary. * <p>If not configured to refresh on connect failure, this method * simply rethrows the original exception. * @param invocation the invocation that failed * @param ex the exception raised on remote invocation * @return the result value of the new invocation, if succeeded * @throws Throwable an exception raised by the new invocation, if failed too. */ private Object handleRemoteConnectFailure(MethodInvocation invocation, Exception ex) throws Throwable { if (this.refreshStubOnConnectFailure) { if (logger.isDebugEnabled()) { logger.debug("Could not connect to RMI service [" + getJndiName() + "] - retrying", ex); } else if (logger.isInfoEnabled()) { logger.info("Could not connect to RMI service [" + getJndiName() + "] - retrying"); } return refreshAndRetry(invocation); } else { throw ex; } }
/** * Refresh the stub and retry the remote invocation if necessary. * <p>If not configured to refresh on connect failure, this method * simply rethrows the original exception. * @param invocation the invocation that failed * @param ex the exception raised on remote invocation * @return the result value of the new invocation, if succeeded * @throws Throwable an exception raised by the new invocation, if failed too. */ private Object handleRemoteConnectFailure(MethodInvocation invocation, Exception ex) throws Throwable { if (this.refreshStubOnConnectFailure) { if (logger.isDebugEnabled()) { logger.debug("Could not connect to RMI service [" + getJndiName() + "] - retrying", ex); } else if (logger.isInfoEnabled()) { logger.info("Could not connect to RMI service [" + getJndiName() + "] - retrying"); } return refreshAndRetry(invocation); } else { throw ex; } }