[prev in list] [next in list] [prev in thread] [next in thread]
List: jacorb-bugs
Subject: [jacorb-bugs] [Bug 132] New: Pending request not returning after POA got destroyed
From: bugzilla-daemon () inf ! fu-berlin ! de
Date: 2002-03-07 16:14:20
Message-ID: 20020307161420.27400.qmail () inf ! fu-berlin ! de
[Download RAW message or body]
http://z1.inf.fu-berlin.de:8081/bugzilla/show_bug.cgi?id=132
Summary: Pending request not returning after POA got destroyed
Product: JacORB
Version: 1.4 beta 2
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: POA
AssignedTo: gerald.brose@acm.org
ReportedBy: tarigopula_p@ociweb.com
Here is the snippet of code:
Policy[] policies = new Policy[1];
policies[0] =
rootPOA.create_implicit_activation_policy(
org.omg.PortableServer.ImplicitActivationPolicyValue.
IMPLICIT_ACTIVATION);
POA poa = null;
try
{
poa = rootPOA.create_POA("poa1", rootMgr, policies);
}
catch(InvalidPolicy ex)
{
throw new RuntimeException();
}
catch(AdapterAlreadyExists ex)
{
throw new RuntimeException();
}
Test_impl2 impl = new Test_impl2(poa);
TestIntf t = impl._this(orb);
Thread thr = new LongCaller(t);
thr.start();
impl.blockUntilCalled();
poa.destroy(true, true);
//=> failing here
// impl.callComplete() returns false where I expect it to be true.
TEST(impl.callComplete());
LongColler:
final static class LongCaller extends Thread
{
private TestIntf t_;
LongCaller(TestIntf t)
{
t_ = t;
}
public void
run()
{
try
{
t_.aMethod();
}
catch(SystemException se)
{
System.err.println(se.getMessage());
se.printStackTrace();
}
}
}
Test_impl2:
final static class Test_impl2 extends TestIntfPOA
{
private POA poa_;
private boolean called_ = false;
private boolean finished_ = false;
Test_impl2(POA poa)
{
poa_ = poa;
}
synchronized public void
aMethod()
{
called_ = true;
notify();
try
{
wait(5000);
}
catch(InterruptedException ex)
{
}
finished_ = true;
}
public POA
_default_POA()
{
return poa_;
}
synchronized void
blockUntilCalled()
{
while(!called_)
{
try
{
wait();
}
catch(InterruptedException ex)
{
}
}
}
synchronized boolean
callComplete()
{
return finished_;
}
}
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic