JBuilder 3 IDL2Java Compiler
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Sunday, August 5, 2001 07:31 PM

Hi all. I'm now trying my hands on CORBA programming using JBuilder3 idl2java compiler. But based on the files generated, there seems no file to support POA. Even the example code generated by JBuilder 3 is using BOA.

My question is does JBuilder 3 idl compiler and ORB runtime libraries support POA? If not, does that mean I must upgrade to higher version to get it to support POA?

Thanks in advance.

JBuilder 3 VisiBroker

Posted By:   Anonymous  
Posted On:   Monday, August 6, 2001 02:30 AM

It seems that Visibroker uses a proprietary Smart Agent to do the Naming Service.



But what I want is to use the CORBA specification COSNaming to ensure maximum portability and I seem not able to find it.



In my code I use

import org.omg.CORBA.*;

import org.omg.CosNaming.*;

import org.omg.CosNaming.NamingContextPackage.*;



public class EasyNaming {

private static NamingContext rootContext;

public static void main(String[] args) {

try {

org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);


System.out.println("Initial services: ");

String[] services = orb.list_initial_services();

System.out.println(services.length);

for(int i = 0; i < services.length; i++)

System.out.println(services[i]);

org.omg.CORBA.Object obj = orb.resolve_initial_references("NameService");

rootContext = org.omg.CosNaming.NamingContextHelper.narrow(obj);

if (rootContext == null)
System.out.println("Cannot find Name Service!");

else System.out.println("Found NameService!");

} catch
(org.omg.CORBA.ORBPackage.InvalidName inex) {

System.out.println(inex);

} catch(org.omg.CORBA.SystemException corba_exception) {

System.out.println(corba_exception);

} }

}


But the above failed! Anyone knows how to activate this COSNaming service besides using VisiBroker vbj to start COSNaming service?

About | Sitemap | Contact