[omniORB] Error deleting the server objects and closing server
Duncan Grisby
duncan@grisby.org
Mon, 29 Apr 2002 17:53:05 +0100
On Monday 29 April, Vivek Aggarwal wrote:
I already replied to this when you sent the same question to
omniorb@uk.research.att.com. For everyone else's benefit, here is my
reply again:
On Thursday 18 April, Vivek Aggarwal wrote:
[...]
> - At server, extract the tie object correspond to the object with
> input id.
> - delete the tie object.
>
> When the server object is deleted, I got an error message that
> omniORB: ERROR -- A servant has been deleted that is still activated.
> id: root<7>
You must _never_ delete a servant while it is activated. You must use
the POA's deactivate_object function.
> I don't expect this error, as I have already made its corresponding
> reference object at the server side to nil.
The existence of CORBA objects is not related to whether clients hold
object references to it. The fact that you have got rid of all of the
references to your object doesn't have any effect on it at all. You
must always explicitly deactivate it.
I strongly recommend that you get and read "Advanced CORBA Programming
with C++" by Henning and Vinoski. That explains all these issues very
well.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --