[omniORB] Persistent Obj Refs.

Alex Hayward xelah@xelah.com
Wed, 20 Jun 2001 11:22:39 +0100 (BST)


On Tue, 19 Jun 2001, Renzo Tomaselli wrote:

> Alex Hayward wrote:
>
> >omniORB won't generate the same IOR for the same object ID on each run
> >unless you use a special POA. You can get a reference to this POA using
> >orb->resolve_initial_references("omniINSPOA"); Even setting the PERSISTENT
> >life span policy won't get you IORs that don't change...
>
> This sounds a little suspicious. I remember a clean explanation from Duncan
> about how keys are composed for a generic POA (not INSPOA) and I cannot see
> any hole for differentiating PERSISTENT object keys, provided that host/port
> stay the same. Where is the trick ?

Hmmm...maybe I just did something wrong when I tried this (it /was/ six
months ago when I hadn't used CORBA quite so much as I have done now).
I've just tried a simple test and it seems to work the way I had original
expected; ie, the same IOR every time.

> On the other hand, the modified example seems to do
> obj=myecho->this();orb>object_to_string(obj) *before* object activation, so
> that I cannot understand where the printed IOR can take its POA info.
> Certainly it cannot be the same as in AWE-2 since activation occurs in
> between and poa is *not* the RootPOA

Calling _this() will cause implicit activation in the root POA, IIRC. In
fact this would explain the behaviour of it, the object activation should
happen before _this() is called.