[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: RMI fixes
Kaffe CVS
cvs-commits at kaffe.org
Tue Sep 21 05:09:09 PDT 2004
PatchSet 5194
Date: 2004/09/21 12:05:10
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: RMI fixes
2004-09-21 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/gnu/java/rmi/server/UnicastServer.java,
libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java:
Resynced with GNU Classpath.
2004-09-20 Ilya Perminov <iperminov at logicalsoft.com>
* gnu/java/rmi/server/UnicastServer.java
(incomingMessageCall): Added code to handle Errors.
* gnu/java/rmi/server/UnicastServerRef.java
(incomingMessageCall): Added code to handle Errors.
Members:
ChangeLog:1.2749->1.2750
libraries/javalib/gnu/java/rmi/server/UnicastServer.java:1.4->1.5
libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java:1.5->1.6
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2749 kaffe/ChangeLog:1.2750
--- kaffe/ChangeLog:1.2749 Tue Sep 21 11:43:07 2004
+++ kaffe/ChangeLog Tue Sep 21 12:05:10 2004
@@ -1,5 +1,18 @@
2004-09-21 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/gnu/java/rmi/server/UnicastServer.java,
+ libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java:
+ Resynced with GNU Classpath.
+
+ 2004-09-20 Ilya Perminov <iperminov at logicalsoft.com>
+
+ * gnu/java/rmi/server/UnicastServer.java
+ (incomingMessageCall): Added code to handle Errors.
+ * gnu/java/rmi/server/UnicastServerRef.java
+ (incomingMessageCall): Added code to handle Errors.
+
+2004-09-21 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/gnu/java/net/protocol/file/Handler.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServer.java
diff -u kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServer.java:1.4 kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServer.java:1.5
--- kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServer.java:1.4 Mon Mar 22 11:24:23 2004
+++ kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServer.java Tue Sep 21 12:05:12 2004
@@ -37,18 +37,23 @@
package gnu.java.rmi.server;
-import gnu.java.rmi.dgc.DGCImpl;
-
+import java.io.DataInputStream;
import java.io.DataOutputStream;
-import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
-import java.rmi.NoSuchObjectException;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Hashtable;
+import java.net.UnknownHostException;
import java.rmi.Remote;
-import java.rmi.RemoteException;
+import java.rmi.ServerError;
import java.rmi.server.ObjID;
+import java.rmi.server.UnicastRemoteObject;
import java.rmi.server.UID;
-import java.util.Hashtable;
+import java.rmi.server.RemoteRef;
+import java.rmi.RemoteException;
+import java.rmi.NoSuchObjectException;
+import gnu.java.rmi.dgc.DGCImpl;
public class UnicastServer
implements ProtocolConstants {
@@ -132,6 +137,10 @@
returnval = e;
returncode = RETURN_NACK;
}
+ catch (Error e) {
+ returnval = new ServerError ("An Error is thrown while processing the invocation on the server", e);
+ returncode = RETURN_NACK;
+ }
}
else {
returnval = new NoSuchObjectException("");
Index: kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java
diff -u kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java:1.5 kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java:1.6
--- kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java:1.5 Mon Mar 22 11:24:24 2004
+++ kaffe/libraries/javalib/gnu/java/rmi/server/UnicastServerRef.java Tue Sep 21 12:05:13 2004
@@ -37,20 +37,35 @@
package gnu.java.rmi.server;
-import java.io.ObjectInputStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
import java.rmi.Remote;
import java.rmi.RemoteException;
+import java.rmi.server.RemoteStub;
import java.rmi.server.ObjID;
-import java.rmi.server.RMIServerSocketFactory;
-import java.rmi.server.RemoteRef;
+import java.rmi.server.ServerRef;
import java.rmi.server.RemoteServer;
-import java.rmi.server.RemoteStub;
+import java.rmi.server.RemoteRef;
import java.rmi.server.ServerNotActiveException;
-import java.rmi.server.ServerRef;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.UID;
import java.rmi.server.Skeleton;
+import java.rmi.server.RemoteCall;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.Thread;
+import java.lang.Exception;
+import java.io.IOException;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
import java.util.Hashtable;
public class UnicastServerRef
@@ -269,7 +284,16 @@
try{
ret = meth.invoke(myself, args);
}catch(InvocationTargetException e){
- throw (Exception)(e.getTargetException());
+ Throwable cause = e.getTargetException();
+ if (cause instanceof Exception) {
+ throw (Exception)cause;
+ }
+ else if (cause instanceof Error) {
+ throw (Error)cause;
+ }
+ else {
+ throw new Error("The remote method threw a java.lang.Throwable that is neither java.lang.Exception nor java.lang.Error.", e);
+ }
}
return ret;
}
More information about the kaffe
mailing list