Getting a handle to the DataBahn (CORBA)
public void getDataBahnHandle() {
_chatSession.createBahn(partyName, "Chat");
System.out.println("New Party created");
} catch (jdceBahnException e) {
System.out.println("Exception in creations" +e);
long startTime = System.currentTimeMillis();
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(this, null);
/* Get a reference to the Naming Service */
org.omg.CORBA.Object nameServiceObj =
orb.resolve_initial_references("NameService");
if (nameServiceObj == null) {
System.out.println("Name Service Object = null");
org.omg.CosNaming.NamingContext nameService =
org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
if (nameService == null) {
System.out.println("nameService = null");
NameComponent[] collabName =
{ new NameComponent("Collaboration", partyName+"Chat"+"Coordinator")};
jdce.byteways.dataBahnHelper.narrow(nameService.resolve(collabName));
System.out.println("Exception: " + e);
long stopTime = System.currentTimeMillis();
System.out.println("Avg Ping to invoke = "
+ ((stopTime - startTime)/1000f) + " msecs");