try {
log.info("**** looking up StatefulBean through JNDI");
StatefulBeanRemote bean = (StatefulBeanRemote)
ctx.lookup("ejb:/" + MODULE_NAME_STATEFUL + "/" + StatefulBean.class.getSimpleName() + "!" + StatefulBeanRemote.class.getCanonicalName()+"?stateful");
log.info("**** About to perform synchronous call on stateful bean");
String response = bean.sayHello();
log.info("**** The answer is: " + response);
Assert.assertEquals("Remote invocation of EJB was not successful", StatefulBeanRemote.ANSWER, response);
deployer.undeploy(DEPLOYMENT_STATEFUL);
} finally {
ctx.close();