1 | { // Initialize the ORB. org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(thisClient); |
2 | // Create the ClientControl object. ClientControlImpl control = new ClientControlImpl(thisClient); orb.connect(control); |
3 | try { /* Get a reference to the Naming Service */ org.omg.CORBA.Object |
4 | nameServiceObj = orb.resolve_initial_references("NameService"); |
5 | if (nameServiceObj == null) { |
6 | System.out.println("Name Service Object = null"); |
7 | return; } |
8 | org.omg.CosNaming.NamingContext nameService = org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj); |
9 | if (nameService == null) { |
10 | System.out.println("nameService = null"); return; } |
11 | NameComponent[] collabName =new NameComponent ("Collaboration", thisClient.partyName+"Chat"+"Coordinator") |
12 | }; |
13 | System.out.println(thisClient.partyName+"Chat"+"Coordinator"); |