On Thu, 17 May 2001, Frank Rehberger wrote:
I dont understand how to connect to the nameservice of orbit.
The following shows my code:
I assume here that you are running orbit-name-server, included in the
ORBit distro, yes?
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
poa = orb.resolve_initial_references("RootPOA")
service = orb.resolve_initial_references("NameService")
Ah, your error lies here, and I'd like Tack to comment if he may.
Look, every CORBA-ized object publishes an object reference for
itself. If
you have noticed, when you run o-n-s, it prints to stdout it's own IOR.
Now I think the standard facility for retrieving this is from
etc/orbitrc
or ~/.orbitrc. Which means AFAICS that if you run the NameService, you
have to paste the IOR into that file. I know of no other way to do
it, but
perhaps Eliott or somebody from orbit can help.
This is a definite problem, since you'll be running the nameservice with
interruptions, possible, which means you'll have to update the file in
realtime. I avoid doing that completely by going an orthogonal way: I
catch the nameserver reference from o-n-s and:
a) store it in a file in an nfs-shared directory, where clients can
catch
it.
b) publish the reference through a webserver or whatever other means. I
personally created a tiny socket server and client that just spits
the IOR
over.
Now my personal opinion is that's just plain annoying. But CORBA -- not
ORBit, I think, put perhaps it lacks a service (from what I grasp of it)
provides no standard mechanism to bootstrap the IOR, and that's evil.
And
since GNOME publishes IOR in another fashion (using xprops, I think) it
doesn't bother them enough to implement some standard workaround :-)
I would like to list the nameservice content.
Who can help me?
I used to have some clients but I seem to have lost them. I'm attaching
the evil solution I use, so you can check it out. Please comment out the
part referring to the configfile as I don't really want to hack this
right
now :-)
Take care,
--
/\/\ Christian Reis, Senior Engineer, Async Open Source, Brazil
~\/~ http://async.com.br/~kiko/ | [+55 16] 274 4311