[omniORB] trying to interpret omniORB debug traces
Stefan Seefeld
seefeld@sympatico.ca
Wed Feb 12 05:58:02 2003
Stefan Seefeld wrote:
> Where is the error ? What causes the 'WouldDeadLock' exception
> to be thrown ?
sorry, some clarification may be in order:
I create a servant temporarily inside the server application
from within a request. I create a new POA and make it a member
of that servant. No objects are ever activated with that POA.
Finally, just before that request is over, I deactivate (and
thus implicitely delete) my servant, resulting in the
KitImpl::~KitImpl destructor to be called, which calls
_poa->destroy(true, true);
Again, that POA doesn't hold any objects, so it can be
deactivated and etherealised immediately (well, the _poa
member is a proxy still holding a reference, so the etherealising
only happens when my KitImpl destructor quits and '_poa' gets
'out of scope'.
That's all. Now I'm reading the following comment in poa.cc:
// In the context of an operation invocation.
// This is interesting. It would be sufficient (but harder) to
// only complain if in the context of an invocation in _this_
// POA. However, the 2.4 spec says "...some POA belonging to the
// same ORB as this POA...". Since we only ever support one ORB,
// life is easy.
OMNIORB_THROW(BAD_INV_ORDER,
BAD_INV_ORDER_WouldDeadLock,
CORBA::COMPLETED_NO);
which seems to suggest that an 'BAD_INV_ORDER' is thrown if *ever*
a poa is (attempted to be) destroyed while inside a request. Why ?
The request doesn't even involve the poa I'm trying to destroy,
so there isn't any deadlock in sight !
What am I doing wrong ? When am I allowed to call 'poa->destroy(true, true)' ?
Thanks for your help !
Stefan