[omniORB] MIME-version: 1.0

Roy Ward rward@infoscience.otago.ac.nz
Mon, 21 Jun 1999 10:58:34 +1200


"James M. Moe" wrote:

> On Fri, 18 Jun 1999 16:11:36 +0200, magnus.bengtsson@ascomtateco.se
> wrote:
>
> >Each time I generate a IOR string ( on the same computer ) it is not same=20=
> >as before,
> >so  wonder how the IOR string is generated ?
>
>     If you using the default method, the object is locating the next
> available port number it can find. Because the port number is
> different, the IOR is different.
>     Try using -BOAiiop_port <port_number_of_your_choice> to specify a
> known port the server always uses. In this the IOR is always the same.

A warning about this - even in this case with some ORBs, the IOR will not
necessarily be the same, because some ORBs encode some of the IOR to
include a pseudo-random number to ensure that each generated IOR is
unique. I think Orbix does this, but I'm not sure about omniORB.

The point that I am getting at here is that relying on the IORs being the
same, so that they can be compared for instance, is a Bad Thing, because
I don't think the CORBA standard requires it.

However, if you are just interested in generating an IOR that can be used
to access an object on a particular computer, the above method should
work fine.

Roy Ward.