Hello everyone,
From what I've read from many posts, I see that many people have:
- a DataInterface which extends java.rmi.Remote and has all public methods from the Data class throwing generic Exceptions (either IOException or Exception).
- a RemoteData class which extends UnicastRemoteObject and implements DataInterface. This class delegates most of its methods to Data. Its methods throw RemoteException.
My design was very much like Andrew Collins's in his post "Local mode - Remote mode", except for the name of the classes which were different.
Mark's comments about Andrew's design: "Serverside is breaking all the OOP rules."
made me reconsider my design.
But I still don't understand why I should have different classes that do the same thing just because one throws RemoteException and the other doesn't. Unless I code twice the same thing on the client (one handling the RemoteException, the other handling a generic exception which may never occur, by the way), I don't see why I should make the distinction between RemoteException in a RemoteData class or a generic exception in the Data class.
I really respect everyone's opinion and I am concerned about my design, but I can't change it if I don't agree with the changes.
Please, someone, convince me!