[omniORB] omniorb + java?

JHJE (Jan Holst Jensen) jhje at novonordisk.com
Mon Jun 13 14:46:21 BST 2005


> omniorb is 4.0.5 (atop debian/sid), and I'm using JDK 1.5.0_01.
> Bootstrap Agent configuration in /etc/omniORB4.cfg is enabled
> according to the omniorb FAQ, and I am trying to use the
> -ORBInitialHost / -ORBInitialPort parameters. No matter, it always
> ends up with an error like that:

Hi Kristian.

We are using Java 1.4 clients and servers (haven't tried 1.5) on various
platforms against omniORB 4.0.0 on Linux. We have not turned on anything
special in omniNames, just running it straight out-of-the-box with
default configuration and without command line parameters, and it is
working fine. I don't know if the bootstrap workaround code was changed
from 4.0.0 to 4.0.5, but I have never had to worry about it on the
omniNames side.

How do you initialize your ORB in your Java code ? We do like this:

      // Initialize ORB.
      Properties props = new Properties();
      props.put("org.omg.CORBA.ORBInitRef",
"NameService=corbaname::cosname.domain.dk:2809");
      ORB orb = ORB.init(args, props);

      // Lookup data source in name server
      org.omg.CORBA.Object anObj =
orb.resolve_initial_references("NameService");
      NamingContext namingRef = NamingContextHelper.narrow(anObj);
      NameComponent objName[] = {
        new NameComponent("COOLink", "data_source"), 
        new NameComponent(dataSrcName_id, dataSrcName_kind)
      };
      anObj = namingRef.resolve(objName);

Don't know if this helps, but at least it shows one way through that
ought to work.

Cheers
-- Jan Holst Jensen, Novo Nordisk A/S, Denmark



More information about the omniORB-list mailing list