[omniORB] resolve_initial_references() blocks
Diego Sevilla Ruiz
dsevilla@ditec.um.es
Sun Jun 2 23:56:01 2002
Hi all:
While playing with Fresco and omniORB3/4, we thought that we
could use -ORBInitRef to add references to resolve_initial_references().
In essence, what we are trying to do is something like this:
client -ORBInitRef FrescoServer=<ior or corbaloc here>
and, within the client, we have a code something like this:
// First try to resolve server reference from the initial
// references
Server_var s = Server::_nil();
try { s = resolve_init<Server>(orb,"FrescoServer");}
catch (...) {}
// Then try accessing the name service
if (CORBA::is_nil(s))
(the resolve_init function is a template function that just calls the
resolve_initial_references and do the correct narrow).
So the code is clear: if you can't find the "FrescoServer"
reference in resolve_initial_references() (InvalidName is thrown), then
"s" reference is still null and the client program tries to obtain it by
other means (in this case, the name service).
If we supply the -ORBInitRef parameter, the client works fine,
but if we don't specify the parameter, the client hangs in
resolve_initial_references(). So I have two questions:
Is it "safe" to use -ORBInitRef this way? And, is it supposed
that resolve_initial_references() returns automatically an InvalidName
exception if the name is not found?
Best regards and thanks in advance.
diego.
--
Diego Sevilla Ruiz http://ditec.um.es/~dsevilla dsevilla@um.es \ /\
Dpto. Ingeniería y Tecnología de Computadores http://ditec.um.es ) ( ')
Visiting Extreme! Computing Lab http://extreme.indiana.edu ( / )
Indiana University, Bloomington http://www.iub.edu \(__)|