Object obj1 = jndicontext.lookup("java:comp/env/UserAdminSessionLocal"); IUserAdminSessionLocalHome adminsessionhome = (IUserAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, IUserAdminSessionLocalHome.class); IUserAdminSessionLocal  adminsession = adminsessionhome.create(); obj1 = jndicontext.lookup("java:comp/env/RaAdminSessionLocal");
Object obj1 = jndicontext.lookup("java:comp/env/RaAdminSessionLocal");
    public GlobalConfiguration initialize_errorpage(HttpServletRequest request) throws Exception{      if(!errorpage_initialized){                      if(administrator == null){          String remoteAddr = request.getRemoteAddr();          administrator = new Admin(Admin.TYPE_PUBLIC_WEB_USER, remoteAddr);        }        InitialContext jndicontext = new InitialContext();        Object obj1 = jndicontext.lookup("java:comp/env/UserAdminSessionLocal");        IUserAdminSessionLocalHome adminsessionhome = (IUserAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, IUserAdminSessionLocalHome.class);        IUserAdminSessionLocal  adminsession = adminsessionhome.create();        obj1 = jndicontext.lookup("java:comp/env/RaAdminSessionLocal");        IRaAdminSessionLocalHome raadminsessionhome = (IRaAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, IRaAdminSessionLocalHome.class);        IRaAdminSessionLocal  raadminsession = raadminsessionhome.create();                obj1 = jndicontext.lookup("java:comp/env/AuthorizationSessionLocal");        IAuthorizationSessionLocalHome authorizationsessionhome = (IAuthorizationSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, IAuthorizationSessionLocalHome.class);        IAuthorizationSessionLocal authorizationsession = authorizationsessionhome.create();        obj1 = jndicontext.lookup("java:comp/env/SignSessionLocal");        ISignSessionLocalHome signsessionhome = (ISignSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, ISignSessionLocalHome.class);        ISignSessionLocal signsession = signsessionhome.create();        obj1 = jndicontext.lookup("java:comp/env/CAAdminSessionLocal");        ICAAdminSessionLocalHome caadminsessionhome = (ICAAdminSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, ICAAdminSessionLocalHome.class);        ICAAdminSessionLocal caadminsession = caadminsessionhome.create();                obj1 = jndicontext.lookup("java:comp/env/CertificateStoreSessionLocal");        ICertificateStoreSessionLocalHome certificatestoresessionhome = (ICertificateStoreSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, ICertificateStoreSessionLocalHome.class);        ICertificateStoreSessionLocal certificatestoresession = certificatestoresessionhome.create();        		obj1 = jndicontext.lookup("java:comp/env/HardTokenSessionLocal");		IHardTokenSessionLocalHome hardtokensessionhome = (IHardTokenSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(obj1, IHardTokenSessionLocalHome.class);		IHardTokenSessionLocal hardtokensession = hardtokensessionhome.create();  				IPublisherSessionLocalHome publishersessionhome = (IPublisherSessionLocalHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("java:comp/env/PublisherSessionLocal"),				IPublisherSessionLocalHome.class);		IPublisherSessionLocal publishersession = publishersessionhome.create();               		        globaldataconfigurationdatahandler =  new GlobalConfigurationDataHandler(administrator, raadminsession, authorizationsession);                globalconfiguration = this.globaldataconfigurationdatahandler.loadGlobalConfiguration();        this.informationmemory = new InformationMemory(administrator, caadminsession, raadminsession, authorizationsession, signsession, certificatestoresession, hardtokensession, publishersession, globalconfiguration);                authorizedatahandler = new AuthorizationDataHandler(administrator, informationmemory, authorizationsession);                 adminspreferences = new AdminPreferenceDataHandler(administrator);        weblanguages = new WebLanguages(globalconfiguration);        if(currentadminpreference == null){           currentadminpreference = adminspreferences.getDefaultAdminPreference();        }        adminsweblanguage = new WebLanguages( currentadminpreference.getPreferedLanguage()                                             ,currentadminpreference.getSecondaryLanguage());        errorpage_initialized=true;      }      return globalconfiguration;    }