[omniORB] "A Servant has been deleted that is still activated"

Stefan Seefeld seefeld@sympatico.ca
Tue, 22 May 2001 11:18:05 -0400


Hi Gordon,

I don't remember in detail how omniORB's BOA worked (since it was by 
definition
non portable), but the conceptual problem is this (whether you use a POA 
or a BOA):

Once you create your servant, you bind it to an object adapter (OA), 
which then can
map incoming requests to servant methods.
Once you are done, you can't simply delete the servant, since it is 
still bound
to the OA. What if there are pending incoming requests for your servant 
? How
can you make sure they are blocked/deleted such that no dangling pointer is
(ab)used ?
The solution is to deactivate the servant (synchronously !) before it is 
deleted. To make
that convenient, you can use ref counting such that the POA will 
implictely delete the
servant after the last request has been processed (and the servant was 
removed from
the 'Active Object Map').

Regards,    Stefan