Marc,
Don't get annoyed
with me, but your new threads test is incomplete:
- You need to
also randomize on the bean's primary key. I say this because some of the
cache bugs I encountered were as a result of one thread throwing a context back
into the InstancePool(via a rollback or remove) while another thread(i.e.
PassivationJob) had a reference to it and was using it. Also, with your
test the way it stands, your entity calls will be serialized, so you have almost
no chance of creating a race condition.
- You should test
the state of your entity bean
i.e.
class EJBThreadsBean
implement EntityBean {
public void
test(String shouldBe)
{
if (!shouldBe.equals(id)) { throw new RemoteException("state invalid");
}
}
}
- You should test
against option 'A', 'B', and 'C' since they are all totally different
behaviour.
- You should test
with reentrant "true"
You could turn this
around and say, "Bill, why don't you do it then?", then I'd happily say,
"Sure!".
Regards,
Bill