Basic HTML version of Foils prepared July 5 98

Foil 49 Publishing the Client Object Reference (CORBA)

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. by Wojtek Furmanski, Subhash Nair, Tom Pulikal


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 nameServiceObj = orb.resolve_initial_references("NameService");
4 if (nameServiceObj == null) {
5 System.out.println("Name Service Object = null");
6 return; }
7 org.omg.CosNaming.NamingContext nameService = org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
8 if (nameService == null) {
9 System.out.println("nameService = null"); return; } NameComponent[] collabName =new NameComponent ("Collaboration", thisClient.partyName+"Chat"+"Coordinator")
10 }; System.out.println(thisClient.partyName+"Chat"+"Coordinator");
11 try { int id= thisClient._chatBahn.register(thisClient.clientName, (jdce.client.clientProxy)control); thisClient.clientID=id; System.out.println("Registration Succeeded"); } catch (jdceBahnException e) { System.out.println(e.typeToString(e.getType())); System.out.println("Registration Failed"); } catch (jdceClientException e){}

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998