[omniORB] Retrieving the ObjectId from an Object Reference

Silvia Andreia Rocha silvia.rocha at SE.EFACEC.PT
Wed Jun 11 15:36:54 BST 2003


Hello,

>-----Original Message-----
>From: Gary Duzan [mailto:gduzan at bbn.com]
>Sent: Wednesday, June 11, 2003 1:55 PM
>To: Silvia Andreia Rocha
>Cc: omniList (E-mail)
>Subject: Re: [omniORB] Retrieving the ObjectId from an Object 
>Reference 
>
>
>In Message <934536459C1DF0408EA45C61B7A01EED094B40 at SENT5> ,
>   Silvia Andreia Rocha <silvia.rocha at SE.EFACEC.PT> wrote:
>
>=>Hello,
>=>Thanks for the reply.
>=>
>=>>=>Does anyone know how an application can obtain the 
>ObjectId associated
>=>with
>=>>=>an IOR?
>=>>=>
>=>>=>I've taken a look at "reference_to_id" but it says that 
>it  will only
>=>work if
>=>>=>the POA used to create the IOR is also used to invoke the
>=>"reference_to_id".
>=>>
>=>>   Do you want to do this in general or only on the server side?
>=>>In general you can't, because the POA interface is "local", 
>but you can
>=>>use reference_to_id() or servant_to_id() on the server.
>=>In fact I need to do this in general, from a given IOR any 
>CORBA Object
>=>(mine are all
>=>clients and servers at the same time) must retrieve the 
>ObjectID associated
>=>with it.
>
>   Sorry, I should have been more clear. This will only work on
>the server side for the particular object. Accessing the object
>id from clients breaks the transparency of object references and
>is outside the CORBA object model.
>
>   Perhaps if you gave us an idea of you are using the object id
>we could suggest alternative designs which would work.

You are absolutely correct; I've been reading very closely the CORBAv2.6
specification
and there is no way it can be done, just like you said it would go against
the theory behind IOR's.

I need to know the ObjecId for many reasons, witch are possible to work
around, but
that will cost a bit of effort, but that is exactlly what we'll do, we must
not genarate non-CORBA compliant issues.

>
>=>I'm not sure but perhaps the get_interface () can do this for me.
>
>   No, this only gives you access to the TypeCode of the object
>in the Interface Repository, if you've set one up. It won't tell
>you anything about the object's identity.

According to what I've read that's absolutely correct.

Many many thank's,
Sílvia

>
>					Gary Duzan
>					BBN Technologies
>					A Verizon Company
>
>



More information about the omniORB-list mailing list