User: sparre
Date: 01/06/19 23:16:29
Modified: src/main/org/jboss/ejb/plugins/jrmp/interfaces
GenericProxy.java
Log:
To be spec-compliant, the proxy should throw java.rmi.NoSuchObjectException
in some cases. However, when throwing that at server-side, the RMI
implementation wraps it in a ServerException.
This change unwraps a ServerException that wraps a NoSuchObjectException.
That should fix the last failing CTS test.
Revision Changes Path
1.13 +15 -2
jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/GenericProxy.java
Index: GenericProxy.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jrmp/interfaces/GenericProxy.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- GenericProxy.java 2001/06/18 20:01:24 1.12
+++ GenericProxy.java 2001/06/20 06:16:29 1.13
@@ -12,6 +12,9 @@
import java.io.ObjectOutput;
import java.rmi.MarshalledObject;
+import java.rmi.ServerException;
+import java.rmi.NoSuchObjectException;
+
import java.util.HashMap;
import java.lang.reflect.Method;
import java.security.Principal;
@@ -35,7 +38,8 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Rickard �berg</a>.
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Dillon</a> *
- * @version $Revision: 1.12 $
+ * @author <a href="mailto:[EMAIL PROTECTED]">Ole Husgaard</a>
+ * @version $Revision: 1.13 $
*/
public abstract class GenericProxy
implements Externalizable
@@ -354,7 +358,16 @@
}
else {
// Marshaling is done by RMI
- result = container.invoke(mo).get();
+ try {
+ result = container.invoke(mo).get();
+ } catch (ServerException ex) {
+ // Suns RMI implementation wraps NoSuchObjectException in
+ // a ServerException. We cannot have that if we want
+ // to comply with the spec, so we unwrap here.
+ if (ex.detail instanceof NoSuchObjectException)
+ throw ex.detail;
+ throw ex;
+ }
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development