{
try
{
InitialContext ctx = new InitialContext();
StatelessSessionHome home = (StatelessSessionHome) ctx.lookup("ejbcts/StatelessSessionBean");
StatelessSession sessionBean;
try
{
sessionBean = home.create();
}
catch (CreateException ex)
{
log.debug("Loopback CreateException: " + ex);
throw new EJBException(ex);
}
sessionBean.loopbackTest(sessionCtx.getEJBObject());
}
catch (javax.naming.NamingException nex)
{
log.debug("Could not locate bean instance");
}