Can I contact multiple RMI Servers from a single RMI Client simultaneously ?

Shaun Childers

Sure, well not exactly simultaneously, but within the same client:

//imports here
public class MyClient {
  public static void main(String[] args){
    try {
      ThisServer server1 = (ThisServer)Naming.lookup("rmi://this.server.host/ThisServer");
      ThatServer server2 = (ThatServer)Naming.lookup("rmi://that.server.host/ThatServer");
   //now call some methods with each server
    catch(Exception e) {}
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.