• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Action to take if unlock() fails

 
Samantha O'Neill
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there
At the moment if an error occurs whilst trying to unlock a record due to the client connection being severed with the server, my application simply reports the error to the user and that's that. I have implemented unreferenced in my RemoteData object so eventually these locks will be cleared but wondered whether people are taking any further action than to report the problem?
Many thanks Sam
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds about all I did. Although is the client is severed, and the server is the one that throws the Exception, your client will never get it, instead it will probable receive an IOException instead.
Mark
 
Matthew Anderson
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although is the client is severed, and the server is the one that throws the Exception, your client will never get it, instead it will probable receive an IOException instead.

Hi Mark
In the above, are you implying that we do not have to code anything specific since the client will eventually receive an IOException after waiting infinitely for the lock to be cleared or do we have to code something specific to prevent such ocurrence?
Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well if you call a remote method and there is no more connection, that is when there will be an IOException thrown.
You won't have to add any extra code for your scenario, as you will not have a probelm in waiting indefinitely if the conncetion is lost.
Mark
 
Samantha O'Neill
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark
Do you mean that an IOExeption will be thrown and not a RemoteException? In which case should we always be catching IOException instead of/in addition to RemoteException in our code?
Thanks Sam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic