getAdminSession().setUserStatus(administrator, username, UserDataConstants.STATUS_KEYRECOVERY);
getAdminSession().setUserStatus(administrator, username, UserDataConstants.STATUS_KEYRECOVERY,false);
    public void execute() throws IllegalAdminCommandException, ErrorAdminCommandException {        try {            if (args.length != 2) {                getOutputStream().println("Usage: RA keyrecovernewest <username>");                return;            }            //InitialContext jndicontext = new InitialContext();            InitialContext jndicontext = getInitialContext();            IKeyRecoverySessionHome keyrecoverysessionhome = (IKeyRecoverySessionHome) javax.rmi.PortableRemoteObject.narrow(jndicontext.lookup(                        "KeyRecoverySession"), IKeyRecoverySessionHome.class);            IKeyRecoverySessionRemote keyrecoverysession = keyrecoverysessionhome.create();            String username = args[1];             boolean usekeyrecovery = getRaAdminSession().loadGlobalConfiguration(administrator).getEnableKeyRecovery();               if(!usekeyrecovery){               getOutputStream().println("Keyrecovery have to be enabled in the system configuration in order to use this command.");               return;                                }                               if(keyrecoverysession.isUserMarked(administrator,username)){               getOutputStream().println("User is already marked for recovery.");               return;                                  }                          keyrecoverysession.markNewestAsRecoverable(administrator, username);                     getAdminSession().setUserStatus(administrator, username, UserDataConstants.STATUS_KEYRECOVERY);              getOutputStream().println("Key corresponding to users newest certificate has been marked for recovery.");                      } catch (Exception e) {            throw new ErrorAdminCommandException(e);        }    }