{
try
{
Context ctx = new InitialContext();
StatefulSessionHome home = (StatefulSessionHome) ctx.lookup("ejbcts/StatefulSessionBean");
StatefulSession sessionBean;
try
{
sessionBean = home.create(testName);
}
catch (CreateException crex)
{
log.debug("Loopback CreateException: " + crex);
throw new EJBException(crex);
}
sessionBean.loopbackTest(sessionCtx.getEJBObject());
}
catch (javax.naming.NamingException nex)
{
log.debug("Could not locate bean instance");