(ICertificateStoreSessionLocalHome) ctx.lookup("java:comp/env/ejb/CertificateStoreSessionLocal");
(ICertificateStoreSessionLocalHome) locator.getLocalHome(ICertificateStoreSessionLocalHome.COMP_NAME);
    public void init(ServletConfig config)         throws ServletException {        super.init(config);                try {            InitialContext ctx = new InitialContext();            ICertificateStoreSessionLocalHome castorehome =                 (ICertificateStoreSessionLocalHome) ctx.lookup("java:comp/env/ejb/CertificateStoreSessionLocal");            m_certStore = castorehome.create();            ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome) ctx.lookup("java:comp/env/ejb/CAAdminSessionLocal");            m_caadminsession = caadminsessionhome.create();            m_adm = new Admin(Admin.TYPE_INTERNALUSER);            ISignSessionLocalHome signhome = (ISignSessionLocalHome) ctx.lookup("java:comp/env/ejb/SignSessionLocal");            m_signsession = signhome.create();                        // Parameters for OCSP signing (private) key            m_sigAlg = config.getInitParameter("SignatureAlgorithm");            if (StringUtils.isEmpty(m_sigAlg)) {                m_log.error("Signature algorithm not defined in initialization parameters.");                throw new ServletException("Missing signature algorithm in initialization parameters.");            }            m_defaultResponderId = config.getInitParameter("defaultResponderID");            if (StringUtils.isEmpty(m_defaultResponderId)) {                m_log.error("Default responder id not defined in initialization parameters.");                throw new ServletException("Missing default responder id in initialization parameters.");            }            String initparam = config.getInitParameter("enforceRequestSigning");            if (m_log.isDebugEnabled()) {                m_log.debug("Enforce request signing : '"                             + (StringUtils.isEmpty(initparam) ? "<not set>" : initparam)                            + "'");            }            m_reqMustBeSigned = true;            if (!StringUtils.isEmpty(initparam)) {                if (initparam.equalsIgnoreCase("false")                     || initparam.equalsIgnoreCase("no")) {                    m_reqMustBeSigned = false;                }            }            initparam = config.getInitParameter("useCASigningCert");            if (m_log.isDebugEnabled()) {                m_log.debug("Use CA signing cert : '"                             + (StringUtils.isEmpty(initparam) ? "<not set>" : initparam)                            + "'");            }            m_useCASigningCert = false;            if (!StringUtils.isEmpty(initparam)) {                if (initparam.equalsIgnoreCase("true")                     || initparam.equalsIgnoreCase("yes")) {                        m_useCASigningCert = true;                }            }            initparam = config.getInitParameter("includeCertChain");            if (m_log.isDebugEnabled()) {                m_log.debug("Include certificate chain: '"                             + (StringUtils.isEmpty(initparam) ? "<not set>" : initparam)                            + "'");            }            m_includeChain = true;            if (!StringUtils.isEmpty(initparam)) {                if (initparam.equalsIgnoreCase("false")                     || initparam.equalsIgnoreCase("no")) {                        m_includeChain = false;                }            }                    } catch(Exception e) {            m_log.error("Unable to initialize OCSPServlet.", e);            throw new ServletException(e);        }    }