/**
* Refresh the connection and retry the MBean invocation if possible.
* <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 it failed as well
* @see #setRefreshOnConnectFailure
* @see #doInvoke
*/
protected Object handleConnectFailure(MethodInvocation invocation, Exception ex) throws Throwable {
if (this.refreshOnConnectFailure) {
String msg = "Could not connect to JMX server - retrying";
if (logger.isDebugEnabled()) {
logger.warn(msg, ex);
}
else if (logger.isWarnEnabled()) {
logger.warn(msg);
}
prepare();
return doInvoke(invocation);
}
else {
throw ex;
}
}
MBeanClientInterceptor.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:lams
作者:
评论列表
文章目录