*/
public void testLocalInterfacePassivation() throws Exception
{
Context ctx = new InitialContext();
getLog().debug("+++ testLocalInterfacePassivation");
StatefulSessionHome sessionHome = ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
StatefulSession sessionBean = sessionHome.create("testLocalInterfacePassivation");
getLog().debug("Creating local home");
AccountPK pk = new AccountPK("123456789");
sessionBean.createLocalEntity(pk, "jduke");
getLog().debug("Creating a second session bean, forcing the first one to be passivated?");
// The pool size has been set to 1 in the container
// config, so creating another ASession here should
// cause the first one to be passivated.
StatefulSession anotherSession = sessionHome.create("testLocalInterfacePassivation2");
getLog().debug("OK, anotherSession="+anotherSession);
getLog().debug("Checking for complete passivation/activation");
Thread.sleep(1000);
assertTrue(sessionBean.getWasPassivated() == true);