public void testStrictPoolingException() throws Exception
{
log.info("+++ testStrictPoolingException");
InitialContext ctx = new InitialContext();
StrictlyPooledSessionHome home = (StrictlyPooledSessionHome)
ctx.lookup("ejbcts/StrictlyPooledCreateExceptionBean");
try
{
StrictlyPooledSession bean = home.create();
fail("Create did not fail, bean="+bean);
}
catch(CreateException e)
{
log.debug("Saw expected create failure", e);
}
for (int n = 0; n < MAX_SIZE; n++)
{
StrictlyPooledSession bean = home.create();
bean.methodA();
bean.remove();
}
}