In DatabaseRemoteImpl I have to throw RemoteException according to RMI. But when I declare the methods my IDE says I can't throw RemoteException because it's not valid according to the throw declarations in the DatabaseInterface (which DatabaseRemoteInterface is inheriting from)
What am I missing ? The guys in the book adds RemoteException to the methods in DvdDatabaseImpl
Joined: Nov 17, 2008
It looks like the IOException thrown in all DBClient methods is the reason for the book example to work.
If I remove IOException or replaces it with a custom Exception the IDE gives me an error.
I think the idea was that the adapter interfaces do not throw IOException or RemoteException. They just wrap those exceptions into something more GUI-friendly. The GUI does not even have to know about RemoteExceptions at all (Except, maybe, the exception handler, which will probably unwrap it and do something with it).