Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how do you handle RemoteException?  RSS feed

 
Iván Párraga
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm developing the assignment with a RMI server. My question is, how do you handle the RemoteException's on the clients (for example the network fails)? Do you show an error window an exit the application? do you try to reconnect? do you log it and ignore it? What do you think is expected about this by the examinees?

Cheers,

Iv�n
 
Jim Petersson
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm showing an error dialog, but I don't close down the client.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivan,

It depends on what your 'business' requirement is and also what causes the RemoteException! As a general case though I'd expect the client to log the error to the user and return to a state where it can continue doing what ever it is doing. An advanced version of a client might offer to retry the operation.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!