[omniORB] Please clarify behaviour of
omniOrbPOA::deactivate_object (poa.cc - 1261)
Martin B.
0xCDCDCDCD at gmx.at
Thu Jan 6 17:30:25 GMT 2011
On 06.01.2011 13:23, Duncan Grisby wrote:
> On Tue, 2011-01-04 at 11:01 +0100, Martin B. wrote:
>
>> I am slightly confused by the behaviour vs. the comment provided with
>> the deactivate_object() function of omniORB.
>> The comment in poa.cc looks like this:
>>
>> - - - - omniORB 4.1.2 / poa.cc, line 1260 - - - -
>> omniOrbPOA::deactivate_object(const PortableServer::ObjectId& oid)
>> // Once an object is targeted for deactivation, things happen in
>> // this order:
>> //
>> // o wait for requests to complete
>> // -- note that new requests can arrive in the mean time, so the
>> // deactivation may never actually complete! This is
>> // necessary to prevent deadlocks in objects which do
>> // re-entrant calls to themselves.
>> - - - -
>>
>> The "note" confuses me, because from what I can see in the code,
>> ...
>
> The comment is correct. Those calls to setDeactivating() and
> removeFromOAObjList() do not prevent further requests coming in to the
> object. They are merely the first stage of deactivation. It is not until
> setEtheralising() is called in lastInvocationHasCompleted() that new
> incoming requests are denied.
>
Thanks!
>> and then handle the waiting for outstanding requests separately.
>>
>> This is also what I observe in my tests, namely that after I have called
>> deactivate_object(), all new requests via any already existing object
>> references will throw CORBA::OBJ_ADAPTER ( OBJ_ADAPTER_POAUnknownAdapter ).
>
> That exception will only be thrown if the object adapter itself is
> destroyed, not if an object is deactivated. Once an object is completely
> deactivated, calls will throw CORBA::OBJECT_NOT_EXIST, not OBJ_ADAPTER.
>
Oh! I guess this means sloppy testing on my part. Since I only
deactivated the object at app shutdown, I may have intermingled the
effects of object deactivation and POA deactivation. Thanks for the
clarification!
cheers,
Martin
More information about the omniORB-list
mailing list