[omniORB] Registering an Object with more than one Name Service???

Glenn A. Hochberg ghochberg@att.com
Wed, 18 Oct 2000 08:03:30 -0400


I think the problem you are experiencing has to do with not being able
to register a
single servant with more than one BOA (or the same BOA twice).  I assume
the reason
you are doing this is in trying to obtain the IORs for the two different
Name
Services, via resolve_initial_references()?  You'll need to get at least
one of the
IORs via another mechanism, for example reading it in from a file and
using
string_to_object().  You should call ORB_init() and BOA_init() once, and
call
_obj_is_ready() once.  You can then bind a single object reference
(obtained via
obj->_this()) to the two different name services, using the CosNaming
interfaces.

    -Glenn

"Michael J. Donahue" wrote:

> How can I register an Object with more that one CORBA Name Service?  I tried
> creating two instances of the ORB and two instances of the BOA each created with
> a fake set of command line arguments that pointed to two different omniORB Name
> Services and then calling obj_is_ready() for each BOA with the same pointer to
> the Objects Implementation.  The second call to obj_is_ready() on the respective
> second instance of BOA generated a CORBA::INV_OBJREF exception.  Is there some
> way I can duplicate the handle to the Object so that it won't get this error,
> yet it will still bind the same Object to both Name Services.
>
> - Mike

--
Glenn A. Hochberg  | "Any activity becomes creative when the doer
AT&T Labs          |  cares about doing it right, or doing it better."
ghochberg@att.com  |      -John Updike
(973) 236-6638     |