getLog().debug("+++ testClientSession()");
Object obj = getInitialContext().lookup(CLIENT_SESSION);
obj = PortableRemoteObject.narrow(obj, SessionHome.class);
SessionHome home = (SessionHome) obj;
getLog().debug("Found SessionHome @ jndiName=ClientSession");
Session bean = home.create(CLIENT_ENTITY);
getLog().debug("Created ClientSession");
try
{
bean.create(0, getBeanCount());
}
catch(javax.ejb.CreateException e)
{
getLog().debug("Exception while creating entities: ", e);
}
long start = System.currentTimeMillis();
bean.read(0);
bean.read(0, getBeanCount());
bean.write(0);
bean.write(0, getBeanCount());
bean.remove(0, getBeanCount());
long end = System.currentTimeMillis();
long elapsed = end - start;
getLog().debug("Elapsed time = "+(elapsed / iterationCount));
}