They give 8 points for server error handling. As I see it all DatabaseExceptions should be thrown to the client in form of RemoteException because they really have nothing to do with RMI server functionality. That leaves only server start-up error like RMI registry errors, data file not found... Do they give 8 point for that? Or what am I missing? Thanks
Think of Database exceptions as, "Sorry you can't unlock this record because you don't have the lock". These exceptions are from the Database, and not a RemoteException. Even though the DataBase exception is a basic exception, it is nice to distinguish these type of errors, and also to display pretty messages to the user. Mark
Not exactly my question. What I am trying to understand is how RMI server handles its errors, and what type errors they are. When a DatabaseException is thrown the client displays a pretty message. Great! But this is not something handled by RMI server. There are 8 points given for server error handling...what are they talking about? [This message has been edited by Gennady Shapiro (edited November 26, 2001).]
>>There are 8 points given for server error handling...what are >>they talking about? That's exactly what I am talking about. the server in the above statement is referring to your entire server not just RMI. That includes your data classes and any supporting classes that you create. But also as far as RMI exceptions there are quite a few. MalFormedURLException, NotBoundException, RemoteException, etc. You can find them all in the Java API help files So does that make more sense to ya? Mark
Mark, I dont think I am being very clear on this. I understand your point about handling exceptions correctly. The question is why do they grade you on server exception handling but not on client exception handling? Is there something else server error handling? I mean should the server dump errors to console? events msgs? Should server quit on RMI binding failure or keep re-trying? things like that... This is probably too much for this project but I just dont understand why they grade your server exception handling and not the client.
Maybe because in client exception, the exceptions are already at the client, But how you handle the exceptions that occur at the server are more tricky. But either way, they have good reason for the 8 points, otherwise it wouldn't be 8 points Mark
The way I handled it, in remote mode: If the server cannot load the file, register in the registry or generally cannot initialize to the point of usefullness then it dies gracefully (much like weblogic!). The mandatory server side exceptions are all that need be worried about. We don't need to make it any more complex. However, I wrap all server exceptions into one of two kind. DatabaseException and RemoteException. In other words, if the criteriaFind arguments are bad they will see a DatabaseException, if they cannot connect they will see a RemoteException etc. That way they don't capture any more than two exceptions on the client. I think your concern is whether you are missing some concept. I think if you follow basic exception handling and can explain your strategy then you will be fine. In other words if you choose to wrap everything on the server side and throw only RemoteExceptions so be it, just write it in design.txt. Hope this helps, Kerry
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!