• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can RMI work on virtual ip?

 
Ching-Tien Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear folks:

I have two question about the RMI:

1. In the SCJD application submission I implement the network mode using
RMI, but in one of my test cases: RemoteObject using the real ip and
client software using virtual ip, client side can retrieve data from
RemoteObject correctly but if one of the clients change the data,
RemoteObject can't notify other clients the data has been changed
and catch a RemoteExcepion(connection refuse: 192.168.xxx.xxx).
Any solution for this situation?
(The code can work perfectly if both hosts are real ip or both hosts
are at the same subnet)

2. SCJD exam didn't mention about required network environment, can I
assumption that the exam just require both server and client side
are at the same subnet and just ignore the test case?

Regards,
Ching-Tien Chang
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ching-Tien Chang,

For starters: this is way beyond the requirements of the assignment. Many candidates do not even test beyond the capabilites of a single PC, let alone on a local area network.

So for your test cases, you can assume that the client and server are on the same subnet.

You also don't need to update all your clients with each booking, but since you have done it, you might as well leave it in there .

As for how to solve your problem - what you need to do is configure the server, specifying the IP address. (Note that in this context, I believe your "clients" are acting as "servers" so that updates can be pushed to them. As such, it is your "client" (acting as a server) which needs to be configured).

Wow - I confused myself just writing that, so what I recommend you do is start by looking at the Sun Documentation on RMI Through Firewalls Via Proxies.

Regards, Andrew
 
Ching-Tien Chang
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew Monkhouse:

Thanks so much for your kindly reply,

and sorry for reply so late ^^"

I think I can just ignore the test case

Sincerely,
Ching-Tien Chang
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic