geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Jonson <fred...@myrealbox.com>
Subject Re: Accessing corba from geronimo [SOLVED]
Date Fri, 24 Oct 2008 17:13:44 GMT
Hello,

I poked around a bit more after Rick and Juergen's followups, and
looked in the yoko source, especially the InitialServiceManager, to
see what it did. Now, I have returned to my original code, but with a
subtle difference, I replaced the property:

  org.omg.CORBA.ORBInitRef.NameService

with 

  yoko.orb.service.NameService

My code now looks like this:

  Properties properties = new Properties();
  properties.put("yoko.orb.service.NameService",
          "corbaloc::10.11.12.13:4003/NameService");
  orb = ORB.init(new String[0], properties);
  org.omg.CORBA.Object ns =
  orb.resolve_initial_references("NameService");
  NamingContextExt namingContext =
    NamingContextExtHelper.narrow(ns);
  org.omg.CORBA.Object obj = namingContext.resolve_str(
         "org/example/FooService");
  communicator = CommunicationHelper.narrow(obj);
  // use the communicator here...

That works in Geronimo, and it sure is a lot more manageable than the
raw IOR lookup string, so I'm happy again. Btw, the yoko documentation
mentions the yoko.orb.service.* property in passing here:

http://cwiki.apache.org/YOKO/orb-properties.html

-- 
Fredrik Jonson


Mime
View raw message