The tutorial explains the basics, but I'm still a bit confused on how to solve this for the assignment.
I guess something like the solution in this thread is the way to go:
https://coderanch.com/t/183727/java-developer-SCJD/certification/NX-DBAccess-RemoteException In my example it will look something like:
DatabaseInterface
DatabaseImpl
AdapterDatabaseInterface
DatabaseRemoteInterface extends Remote, AdapterDatabaseInterface
DatabaseRemoteImpl extends UnicastRemoteObject implements AdapterDatabaseRemoteInterface
DatabaseLocalImpl extends AdapterDatabaseInterface
DatabaseInterface and AdapterDatabaseInterface have the same methods but the Adapter in addition throws IOException on all methods
DatabaseRemoteImpl and DatabaseLocalImpl both holds an instance of the DatabaseImpl
Does this look like an ok design ? The only thing worrying me is the IOException I have to catch in the standalone mode.
[ November 17, 2008: Message edited by: Serev Nikolaisen ]
[ November 17, 2008: Message edited by: Serev Nikolaisen ]