I am trying to figure out how to solve this problem:
The methods I am making available via RMI need to throw RemoteException. However, the methods that they overwrite do not throw RemoteException. I guess this is a fairly common problem encountered when coding B&S but I havent been able to find any documentation that has been of use.
It still leaves me without a solution for the bigger picture .
So I get to write the exceptions that the sun provided interfaces' methods throw. So I guessed that if I made them extend RemoteException then I would have solved my problem. But I am still coming up with the following error when i try to run my Server:
So I guessed that if I made them extend RemoteException then I would have solved my problem.
That's simply a bad design! You should only use inheritance if you have an IS-A relationship between 2 classes, not because it's convenient. And because RecordNotFoundException is not a RemoteException using inheritance is not the way to go.
Maybe I am wrong on that one?
Just create an own business service interface where each method throws RemoteException. Here you decide between a thick or thin client approach.