obj = jndiContext.lookup("CAAdminSession"); caadminhome = (ICAAdminSessionHome) javax.rmi.PortableRemoteObject.narrow(obj, ICAAdminSessionHome.class); obj = jndiContext.lookup("AuthenticationSession"); authhome = (IAuthenticationSessionHome) javax.rmi.PortableRemoteObject.narrow(obj, IAuthenticationSessionHome.class);
    public BatchMakeP12()            throws javax.naming.NamingException, javax.ejb.CreateException, java.rmi.RemoteException,            java.io.IOException {        log.debug(">BatchMakeP12:");        administrator = new Admin(Admin.TYPE_BATCHCOMMANDLINE_USER);        // Bouncy Castle security provider        CertTools.installBCProvider();        Context jndiContext = getInitialContext();        Object obj = jndiContext.lookup("UserAdminSession");        adminhome = (IUserAdminSessionHome) javax.rmi.PortableRemoteObject.narrow(obj, IUserAdminSessionHome.class);        obj = jndiContext.lookup("RaAdminSession");        raadminhome = (IRaAdminSessionHome) javax.rmi.PortableRemoteObject.narrow(obj, IRaAdminSessionHome.class);        obj = jndiContext.lookup("RSASignSession");        signhome = (ISignSessionHome) javax.rmi.PortableRemoteObject.narrow(obj, ISignSessionHome.class);        IRaAdminSessionRemote raadmin = raadminhome.create();        usekeyrecovery = (raadmin.loadGlobalConfiguration(administrator)).getEnableKeyRecovery();        if (usekeyrecovery) {            obj = jndiContext.lookup("KeyRecoverySession");            keyrecoveryhome = (IKeyRecoverySessionHome) javax.rmi.PortableRemoteObject.narrow(obj, IKeyRecoverySessionHome.class);        }        log.debug("<BatchMakeP12:");    } // BatchMakeP12