Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 204

Summary: POA.deactivate_object() hangs
Product: JacORB Reporter: Dmitri Kuznetsov <dmitri>
Component: POAAssignee: Reimo Tiedemann <tie>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 1.4.0   
Hardware: Sun   
OS: SunOS   

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