> My question is: What propper cleanup do i have to do in a case of
> exception?
None.
> What do i do with the RemoteObject (Proxy) after an exception occured on
> the client?
Nothing except maybe reacquire it, as you are doing, making sure to
discard the old one for GC and DGC purposes.
> Do i have to do anything with the registered Object on the Server?
No.
> After Terminating the client some connections are removed, some remain
Any connections that remain after the client JVM exits are probably
between the server and the registry, or else have nothing to do with RMI.
> and i think the number of connections still present is equal to the
> number of the clients reconnects after an exception.
If the client JVM has exited this is not possible, as all its
connections will have been terminated by the operating system.
> => Do Sockets (Connections) get spoiled here?
No.
You need to know that there are connections between the client and the
Registry, the Registry and the server, and the client and the server,
for DGC purposes, as well as connections from the client to the Registry
for lookup() and list() purposes and connections from client to server
for remote method invocations. All these connections should terminate
after 15 seconds of idleness at the client, or an hour or two of
idleness at the server, unless you have modified the system properties
that control these RMI connection timeouts.