}  log.info("Password:" + data.getPassword());
}
    public void createAllWithStatus(int status) throws Exception {        log.debug(">createAllWithStatus: " + status);        Collection result;        IUserAdminSessionRemote admin = adminhome.create();        boolean stopnow = false;        //Collection result = admin.findAllUsersByStatus(administrator, status);        do {            result = admin.findAllUsersByStatusWithLimit(administrator, status, true);            log.info("Batch generating " + result.size() + " users.");            int failcount = 0;            int successcount = 0;            if (result.size() > 0) {                if (result.size() < IUserAdminSessionRemote.MAXIMUM_QUERY_ROWCOUNT) {                    stopnow = true;                }                Iterator it = result.iterator();                boolean createJKS;                boolean createPEM;                boolean createP12;                int tokentype = SecConst.TOKEN_SOFT_BROWSERGEN;                String failedusers = "";                String successusers = "";                while (it.hasNext()) {                    createJKS = false;                    createPEM = false;                    createP12 = false;                    UserAdminData data = (UserAdminData) it.next();                    if ((data.getPassword() != null) && (data.getPassword().length() > 0)) {                        try {                            // get users Token Type.                            tokentype = data.getTokenType();                            createP12 = tokentype == SecConst.TOKEN_SOFT_P12;                            createPEM = tokentype == SecConst.TOKEN_SOFT_PEM;                            createJKS = tokentype == SecConst.TOKEN_SOFT_JKS;                            // Only generate supported tokens                            if (createP12 || createPEM || createJKS) {                                if (status == UserDataLocal.STATUS_KEYRECOVERY) {                                    log.info("Retrieving keys for " + data.getUsername());                                } else {                                    log.info("Generating keys for " + data.getUsername());                                }                                log.info("Password:" + data.getPassword());                                // Grab new user, set status to INPROCESS                                admin.setUserStatus(administrator, data.getUsername(),                                    UserDataLocal.STATUS_INPROCESS);                                processUser(data, createJKS, createPEM,                                    (status == UserDataLocal.STATUS_KEYRECOVERY));                                // If all was OK , set status to GENERATED                                admin.setUserStatus(administrator, data.getUsername(),                                    UserDataLocal.STATUS_GENERATED);                                // Delete clear text password                                admin.setClearTextPassword(administrator, data.getUsername(), null);                                successusers += (":" + data.getUsername());                                successcount++;                            } else {                                log.debug(                                    "Cannot batchmake browser generated token for user (wrong tokentype)- " +                                    data.getUsername());                            }                        } catch (Exception e) {                            // If things went wrong set status to FAILED                            log.error("An error happened, setting status to FAILED.", e);                            failedusers += (":" + data.getUsername());                            failcount++;                            admin.setUserStatus(administrator, data.getUsername(),                                UserDataLocal.STATUS_FAILED);                        }                    } else {                        log.debug("User '" + data.getUsername() +                            "' does not have clear text password.");                    }                }                if (failedusers.length() > 0) {                    throw new Exception("BatchMakeP12 failed for " + failcount + " users (" +                        successcount + " succeeded) - " + failedusers);                }                log.info(successcount + " new users generated successfully - " + successusers);            }        } while ((result.size() > 0) && !stopnow);        log.debug("<createAllWithStatus: " + status);    }