Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI : connection lost Exception

 
Devu Shah
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am throwing all posible error from remoteData class to client.
I am getting almost every exception ok Except, when server is made shut down and then remote client is just booking ticket, instead of getting error "Connection lost" I get error "connection is refused...." !!!
Can anybody guide why it is like this? (I could override message manually to show conncetion is btoken BUT.. i want it should be thrown from server side (stub is there to inform us ??)
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason is that an RMI client does not retain a permanent connection to the server - that wouldn't exactly scale well! So when you make the method call the client attempts to open the server connection, but the connection is refused. On the other hand, when the server would go down in the middle of a method call, the existing connection would be broken and you would get a different message.
- Peter

[This message has been edited by Peter den Haan (edited October 20, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic