IRaAdminSessionLocalHome raadminsessionhome = (IRaAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/RaAdminSessionLocal"), IRaAdminSessionLocalHome.class);
IRaAdminSessionLocalHome raadminsessionhome = (IRaAdminSessionLocalHome) locator.getLocalHome(IRaAdminSessionLocalHome.COMP_NAME);
    public void initialize(HttpServletRequest request, EjbcaWebBean ejbcawebbean) throws  Exception{      if(!initialized){        administrator = new Admin(((X509Certificate[]) request.getAttribute( "javax.servlet.request.X509Certificate" ))[0]);        InitialContext jndicontext = new InitialContext();        Object obj1 = jndicontext.lookup("java:comp/env/CertificateStoreSessionLocal");        ICertificateStoreSessionLocalHome certificatesessionhome = (ICertificateStoreSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, ICertificateStoreSessionLocalHome.class);        certificatesession = certificatesessionhome.create();                obj1 = jndicontext.lookup("java:comp/env/CAAdminSessionLocal");        ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, ICAAdminSessionLocalHome.class);        caadminsession = caadminsessionhome.create();                IAuthorizationSessionLocalHome authorizationsessionhome = (IAuthorizationSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/AuthorizationSessionLocal"),                                                                                 IAuthorizationSessionLocalHome.class);        authorizationsession = authorizationsessionhome.create();                obj1 = jndicontext.lookup("java:comp/env/UserAdminSessionLocal");        IUserAdminSessionLocalHome adminsessionhome = (IUserAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, IUserAdminSessionLocalHome.class);        adminsession = adminsessionhome.create();        IRaAdminSessionLocalHome raadminsessionhome = (IRaAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/RaAdminSessionLocal"),                                                                                 IRaAdminSessionLocalHome.class);        raadminsession = raadminsessionhome.create();                       		ISignSessionLocalHome home = (ISignSessionLocalHome)javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/SignSessionLocal"), ISignSessionLocalHome.class );	    signsession = home.create();	    	    IHardTokenSessionLocalHome hardtokensessionhome = (IHardTokenSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/HardTokenSessionLocal"),	    		IHardTokenSessionLocalHome.class);	    hardtokensession = hardtokensessionhome.create();               	    	    IPublisherSessionLocalHome publishersessionhome = (IPublisherSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/PublisherSessionLocal"),	    		IPublisherSessionLocalHome.class);	    publishersession = publishersessionhome.create();               	    	            this.informationmemory = ejbcawebbean.getInformationMemory();                  certificateprofiles = new CertificateProfileDataHandler(administrator, certificatesession, authorizationsession, informationmemory);        cadatahandler = new CADataHandler(administrator, caadminsession, adminsession, raadminsession, certificatesession, authorizationsession, signsession, ejbcawebbean);        publisherdatahandler = new PublisherDataHandler(administrator, publishersession, authorizationsession,         		                                        caadminsession, certificatesession,  informationmemory);        initialized =true;      }    }