442443444445446447448449450451452
} public void testTimeoutRemoval() throws Exception { StatefulTimeout sfsb = (StatefulTimeout)getInitialContext().lookup("StatefulTimeoutBean/remote"); sfsb.test(); Thread.sleep(5 * 1000); try { sfsb.test();
447448449450451452453454455456457
sfsb.test(); Thread.sleep(5 * 1000); try { sfsb.test(); fail("SFSB should have been removed via timeout"); } catch (javax.ejb.NoSuchEJBException e) { }
454455456457458459460461462463464
} catch (javax.ejb.NoSuchEJBException e) { } sfsb = (StatefulTimeout)getInitialContext().lookup("StatefulTimeoutBean2/remote"); sfsb.test(); Thread.sleep(10 * 1000); try { sfsb.test();
459460461462463464465466467468469
sfsb.test(); Thread.sleep(10 * 1000); try { sfsb.test(); fail("SFSB should have been removed via timeout"); } catch (javax.ejb.NoSuchEJBException e) { } }
469470471472473474475476477478479
} public void testClusteredTimeoutRemoval() throws Exception { StatefulTimeout sfsb = (StatefulTimeout)getInitialContext().lookup("StatefulClusteredTimeoutBean/remote"); sfsb.test(); Thread.sleep(5 * 1000); try { sfsb.test();
474475476477478479480481482483484
481482483484485486487488489490491
} catch (javax.ejb.NoSuchEJBException e) { } sfsb = (StatefulTimeout)getInitialContext().lookup("StatefulClusteredTimeoutBean2/remote"); sfsb.test(); Thread.sleep(10 * 1000); try { sfsb.test();
486487488489490491492493494495496