*/
public void testSessionRefPassivation() throws Exception
{
Context ctx = new InitialContext();
getLog().debug("+++ testSessionRefPassivation");
StatefulSessionHome sessionHome = ( StatefulSessionHome ) ctx.lookup("ejbcts/StatefulSessionBean");
StatefulSession sessionBean = sessionHome.create("testSessionRefPassivation");
getLog().debug("Creating session ref");
sessionBean.createSessionRef();
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("testSessionRefPassivation2");
getLog().debug("OK, anotherSession="+anotherSession);
getLog().debug("Checking for complete passivation/activation");
Thread.sleep(1000);
assertTrue(sessionBean.getWasPassivated() == true);