P R
P R

Reputation: 1301

RMI between 2 JVMs on diff physical machines

Can anyone tell me where I should make changes in an RMI program for 2 JVMs on same physical machine to 2 JVMs on diff physical machines in the example here

@Olaf- can you help me out?

Upvotes: 0

Views: 527

Answers (2)

Olaf
Olaf

Reputation: 6289

The example that you quoted has the following URI for the RMI call:

"rmi://localhost:1099/CalculatorService"

This tells your RMI client to call RMI server on the same host. If you substitute the hostname or IP address of the remote server for the "localhost", your client would call it instead.

Upvotes: 2

Pablo Santa Cruz
Pablo Santa Cruz

Reputation: 181280

If you did it correctly, then you don't need to change anything. That's exactly what RMI is for.

Upvotes: 1

Related Questions