BrunoPires
BrunoPires

Reputation: 383

Change endpoint reference on Remote object. Is it possible?

My application uses a RMI server that is connected to the internet throuhg a 3G dongle, and it's external IP changes every couple hours. After server's ip changes clients that have stubs bound to the old ip looses ability to invoke remote methods. And that's because RMI stubs store a reference to the remote endpoint when they're created. Having a dynamic DNS service hooked up to my server, if I could change endpoint reference on clients stubs, I would be able to update it to the correct IP. But is it possible?

Upvotes: 0

Views: 246

Answers (1)

user207421
user207421

Reputation: 310874

No. The server would have to contact all clients holding stubs and tell them to change it and to what. (a) An RMI server doesn't automatically know all its clients; (b) it doesn't automatically know when its IP address changes; and (c) it has no means of communicating with them other than when the client decides to, which is already too late.

Upvotes: 1

Related Questions