Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A client/server issue ...  RSS feed

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an RMI server where clients connect to.

It's normal that when the server is down, the client will throw an exception indicating that it can not connect to the server.

I have to deal with an issue in which when the server is shutdown, i need the client to wait for it to start again (The server will start again using the same IP and port for sure).

I'm trying to do this, but the client is not being able to re-connect to the server again!

Can anyone please suggest a solution for this case ?

Thanks in advance ...
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vassili Vladimir:
the client is not being able to re-connect to the server again!


What is the error you are getting?
Are you getting the error while looking up the server stub or while invoking a method on it?
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm getting the problem while looking for the server stub!

Any suggestions ?

Regards,
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm getting the problem when invoking a method!

Any suggestions ?

Regards,
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you going to tell us what the exception is you're getting, including the stack trace?
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to refresh the stub in the client if the server is restarted. (Even if the export ip and port is the same.)
So, if you are getting the RemoteException while invoking a method on a previously looked up stub, this means that the server may have been restarted and you must try and lookup the stub again.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!