Just wanted to quickly check that my RMI design is okay...have finished but maybe what i have done is so shoddy they will fail me...SO..doing B&S..
I have a Data class that implements the DBAcess interface (no rmi in either)
I have a RemoteData class that implements RemoteDB.
RemoteDB is identical to DBAccess interface except that it extends java.rmi.Remote and its methods throw java.rmi.RemoteException.
RemoteData implements RemoteDB and extends java.rmi.UnicastRemoteObject.
The RemoteData class has an instance of Data as a variable - so when its methods are called it calls the equivalent method in the Data class - i.e. used the same code, just with RMI wrapper.
I *think* this is all basically OK. However, in my GUI, I have an instance of RemoteData r and Data d. At startup, the mode (i.e. standalone, client, server) is passed to the GUI, and if we are in client mode then we call methods on RemoteData r, else we call on Data d. Does that sound basically okay, or is really bad design? I have heard others speak of DataProxy, but have not quite comprehended what is meant by that...
Thanks
Lucy