Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 204 - POA.deactivate_object() hangs
Summary: POA.deactivate_object() hangs
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: POA (show other bugs)
Version: 1.4.0
Hardware: Sun SunOS
: P3 normal
Assignee: Reimo Tiedemann
URL:
Depends on:
Blocks:
 
Reported: 2002-06-12 03:16 UTC by Dmitri Kuznetsov
Modified: 2002-06-12 17:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Kuznetsov 2002-06-12 03:16:24 UTC
When the POA.deactivate_object(oid) is called within the context of invocation
where oid is the object id of the called servant, it never returns. This worked
in 1.4 betas. For example, in the following typical case:

interface MyInterface {
  ...
  void close();
}

and the servant code:

public void close() {
 ...
 byte[] oid = myPOA.servant_to_id(this);
 myPOA.deactivate_object(oid);
}

Here's what I've dug out so far:
In the org.jacorb.poa.POA.deactivate_object() code, a call to
RequestController.waitForDeactivationStart() was added since 1.4beta4. This
method appears to be waiting on oid (oid.wait()). But it also appears that the
code that is supposed to "oid.notify()" - in org.jacorb.poa.AOM.remove() - is
waiting in RequestController.waitForObjectCompletion() which will not return
until the active operation (MyInterface::close in the example above) completes.

Currently, the workaround is to call the deactivate_object in another thread.
Comment 1 Reimo Tiedemann 2002-06-12 17:08:24 UTC
Fixed. Will be contained in the upcomming 1.4.1
changed org.jacorb.poa.POA.deactivate_object()
changed org.jacorb.poa.AOM
changed org.jacorb.poa.RequestController