{ HttpSession session = req.getSession(); CAInterfaceBean cabean = (CAInterfaceBean) session.getAttribute("cabean"); if (cabean == null) { try { cabean = (CAInterfaceBean) Beans.instantiate(this.getClass().getClassLoader(), "se.anatom.ejbca.webdist.cainterface.CAInterfaceBean"); } catch (ClassNotFoundException e) { throw new ServletException(e); } catch (Exception e) { throw new ServletException("Unable to instantiate CAInterfaceBean", e); } try { cabean.initialize(req, getEjbcaWebBean(req)); } catch (Exception e) { throw new ServletException("Cannot initialize CAInterfaceBean", e); } session.setAttribute("cabean", cabean);
{ HttpSession session = req.getSession(); CAInterfaceBean cabean = (CAInterfaceBean) session.getAttribute("cabean"); if (cabean == null) { try { cabean = (CAInterfaceBean) Beans.instantiate(this.getClass().getClassLoader(), "se.anatom.ejbca.webdist.cainterface.CAInterfaceBean"); } catch (ClassNotFoundException e) { throw new ServletException(e); } catch (Exception e) { throw new ServletException("Unable to instantiate CAInterfaceBean", e); } try { cabean.initialize(req, getEjbcaWebBean(req)); } catch (Exception e) { throw new ServletException("Cannot initialize CAInterfaceBean", e); } session.setAttribute("cabean", cabean); } return cabean;
  private final CAInterfaceBean getCaBean(HttpServletRequest req)    throws ServletException  {    HttpSession session = req.getSession();    CAInterfaceBean cabean = (CAInterfaceBean) session.getAttribute("cabean");    if (cabean == null) {      try {        cabean = (CAInterfaceBean) Beans.instantiate(this.getClass().getClassLoader(), "se.anatom.ejbca.webdist.cainterface.CAInterfaceBean");      } catch (ClassNotFoundException e) {        throw new ServletException(e);      } catch (Exception e) {        throw new ServletException("Unable to instantiate CAInterfaceBean", e);      }      try {        cabean.initialize(req, getEjbcaWebBean(req));      } catch (Exception e) {        throw new ServletException("Cannot initialize CAInterfaceBean", e);      }      session.setAttribute("cabean", cabean);    }    return cabean;  }