String module = getRequiredParameter(req, MODULE);
String bean = getRequiredParameter(req, BEAN);
HttpSession session = req.getSession(true);
Incrementor incrementor = (Incrementor) session.getAttribute(BEAN);
if (incrementor == null) {
try (LocalEJBDirectory directory = new LocalEJBDirectory(module)) {
incrementor = directory.lookupStateful(bean, Incrementor.class);
} catch (NamingException e) {
throw new ServletException(e);
}
}
try {