administrator = new Admin(((X509Certificate[]) request.getAttribute( "javax.servlet.request.X509Certificate" ))[0]);
if(request.getAttribute( "javax.servlet.request.X509Certificate" ) != null) administrator = new Admin(((X509Certificate[]) request.getAttribute( "javax.servlet.request.X509Certificate" ))[0]); else administrator = new Admin(Admin.TYPE_PUBLIC_WEB_USER, request.getRemoteAddr());
    public void initialize(HttpServletRequest request) throws  Exception{      cat.debug(">initialize()");      if(!initialized){        administrator = new Admin(((X509Certificate[]) request.getAttribute( "javax.servlet.request.X509Certificate" ))[0]);        // Get the UserAdminSession instance.        jndicontext = new InitialContext();        Object obj1 = jndicontext.lookup("UserAdminSession");        adminsessionhome = (IUserAdminSessionHome) javax.rmi.PortableRemoteObject.narrow(obj1, IUserAdminSessionHome.class);        adminsession = adminsessionhome.create();        obj1 = jndicontext.lookup("RaAdminSession");        raadminsessionhome = (IRaAdminSessionHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("RaAdminSession"),                                                                                 IRaAdminSessionHome.class);        raadminsession = raadminsessionhome.create();        this.profiles = new EndEntityProfileDataHandler(administrator);        obj1 =  jndicontext.lookup("CertificateStoreSession");        certificatesessionhome = (ICertificateStoreSessionHome) javax.rmi.PortableRemoteObject.narrow(obj1, ICertificateStoreSessionHome.class);        certificatesession = certificatesessionhome.create();        obj1 = jndicontext.lookup("AuthorizationSession");        IAuthorizationSessionHome authorizationsessionhome = (IAuthorizationSessionHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup("AuthorizationSession"),                                                                                 IAuthorizationSessionHome.class);        globalconfiguration = adminsession.loadGlobalConfiguration(administrator);        authorizationsession = authorizationsessionhome.create();        authorizationsession.init(globalconfiguration);        profileauthproxy = new EndEntityProfileAuthorizationProxy(authorizationsession);        certprofilenameproxy = new CertificateProfileNameProxy(administrator);        profilenameproxy = new EndEntityProfileNameProxy(administrator);        initialized =true;      } else {          cat.debug("=initialize(): already initialized");      }      cat.debug("<initialize()");    }