{
InitialContext ctx = new InitialContext();
RunAsTargetLocalHome home = null;
Context enc = (Context) ctx.lookup("java:comp/env");
home = (RunAsTargetLocalHome) enc.lookup(ejbName);
RunAsTargetLocal bean = home.create();
bean.checkRunAs();
}
catch(Exception e)
{
throw new ServletException("Access to failed to method: checkRunAs", e);