[omniORB] Persistent Obj Refs.

Andrew Weaver Andrew.Weaver@tecnomen.fi
Tue, 19 Jun 2001 15:11:51 +0300


Moi, here is some modification of eg2_impl from the
$TOP/src/examples/poa/persistent_objeref

    // Activate the echo object...
    Echo_i* myecho = new Echo_i();
//
// AWE - 1
//
    obj = myecho->_this();
    CORBA::String_var sior(orb->object_to_string(obj));
    cerr << "AWE 1 '" << (char*)sior << "'" << endl;

    poa->activate_object_with_id(oid, myecho);
//
// AWE -2
//
    obj = myecho->_this();
    CORBA::String_var sior2(orb->object_to_string(obj));
    cerr << "AWE 2 '" << (char*)sior2 << "'" << endl;

With the code like this, I get the same string for the IOR from the AWE -1
block as from AWE-2. However, this string is not the same from run to run.

If I comment out the AWE-2 code, I get not the same string run to run.

Only when the code is as the original (with only AWE-2 code active) all is
OK. I am curious about this behaviour.

Kind Regards

Andy Weaver