我正在研究处理从 Spring Hessian 连接中断中恢复的方法。如果连接断开,Hessian 代理可能抛出哪些异常?
最佳答案
这是一个示例堆栈跟踪,每次您尝试连接到不可用的 Hessian 远程服务时都会得到:
线程“AWT-EventQueue-0”中的异常 org.springframework.remoting.RemoteConnectFailureException:无法连接到 [http://localhost:17026/remoting/TestService] 的 Hessian 远程服务;嵌套异常是 java.net.ConnectException: Connection refused: connect 在 org.springframework.remoting.caucho.HessianClientInterceptor.convertHessianAccessException(HessianClientInterceptor.java:262) 在 org.springframework.remoting.caucho.HessianClientInterceptor.invoke(HessianClientInterceptor.java:235) 在 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 在 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 在 $Proxy1.getNameFromKassa(未知来源) ……
顺便说一句,hessian 代理不会因为宕机而抛出任何异常 ;)
关于java - Spring Hessian 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11684403/