From: Juergen H. <jho...@us...> - 2006-04-21 00:14:28
|
Update of /cvsroot/springframework/spring/src/org/springframework/remoting/rmi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19629/src/org/springframework/remoting/rmi Modified Files: Tag: mbranch-1-2 RmiClientInterceptorUtils.java Log Message: backported fixes and enhancements from 2.0 M4 (HEAD) Index: RmiClientInterceptorUtils.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/remoting/rmi/RmiClientInterceptorUtils.java,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** RmiClientInterceptorUtils.java 17 Sep 2005 17:05:31 -0000 1.8 --- RmiClientInterceptorUtils.java 21 Apr 2006 00:13:49 -0000 1.8.4.1 *************** *** 1,4 **** /* ! * Copyright 2002-2005 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); --- 1,4 ---- /* ! * Copyright 2002-2006 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); *************** *** 30,34 **** import java.util.Arrays; - import org.aopalliance.aop.AspectException; import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; --- 30,33 ---- *************** *** 37,40 **** --- 36,40 ---- import org.springframework.remoting.RemoteAccessException; import org.springframework.remoting.RemoteConnectFailureException; + import org.springframework.remoting.RemoteProxyFailureException; /** *************** *** 92,97 **** */ public static Object doInvoke(MethodInvocation invocation, Remote stub) throws InvocationTargetException { try { - Method method = invocation.getMethod(); if (method.getDeclaringClass().isInstance(stub)) { // directly implemented --- 92,97 ---- */ public static Object doInvoke(MethodInvocation invocation, Remote stub) throws InvocationTargetException { + Method method = invocation.getMethod(); try { if (method.getDeclaringClass().isInstance(stub)) { // directly implemented *************** *** 107,112 **** throw ex; } catch (Throwable ex) { ! throw new AspectException("Local remote service proxy invocation failed", ex); } } --- 107,115 ---- throw ex; } + catch (NoSuchMethodException ex) { + throw new RemoteProxyFailureException("No matching RMI stub method found for: " + method, ex); + } catch (Throwable ex) { ! throw new RemoteProxyFailureException("Invocation of RMI stub method failed: " + method, ex); } } |