}
@Test
public void testConstruction() throws Exception
{
FailingConstructingLocal bean = lookup("FailingConstructingBean/local", FailingConstructingLocal.class);
// the first try will succeed
// the second will fail to acquire a permit, if the bug is present
for(int i = 0; i < 2; i++)
{
try
{
bean.solveAllMyProblems();
fail("I doubt that all my problems are solved.");
}
catch(EJBException e)
{
assertCause(new RuntimeException("I fail construction purposely"), e);