CATokenManager.instance();
// Load CAs at startup to improve impression of speed the first time a CA is accessed, it takes a little time to load it.
log.trace(">init loading CAs into cache");
try {
Admin admin = new Admin(Admin.TYPE_CACOMMANDLINE_USER, "StartServicesServlet");
caAdminSession.initializeAndUpgradeCAs(admin);
} catch (Exception e) {
log.error("Error creating CAAdminSession: ", e);
}
// Make a log row that EJBCA is starting
Admin internalAdmin = Admin.getInternalAdmin();
logSession.log(internalAdmin, internalAdmin.getCaId(), LogConstants.MODULE_SERVICES, new Date(), null, null,
LogConstants.EVENT_INFO_STARTING, iMsg);
log.trace(">init calling ServiceSession.load");
try {
serviceSession.load();
} catch (Exception e) {
log.error("Error init ServiceSession: ", e);
}
// Load Certificate profiles at startup to upgrade them if needed
log.trace(">init loading CertificateProfile to check for upgrades");
try {
Admin admin = new Admin(Admin.TYPE_CACOMMANDLINE_USER, "StartServicesServlet");
certificateProfileSession.initializeAndUpgradeProfiles(admin);
} catch (Exception e) {
log.error("Error creating CAAdminSession: ", e);
}
// Load EndEntity profiles at startup to upgrade them if needed
// And add this node to list of nodes
log.trace(">init loading EndEntityProfile to check for upgrades");
try {
Admin admin = new Admin(Admin.TYPE_CACOMMANDLINE_USER, "StartServicesServlet");
endEntityProfileSession.initializeAndUpgradeProfiles(admin);
// Add this node's hostname to list of nodes
log.trace(">init checking if this node is in the list of nodes");
final GlobalConfiguration config = globalConfigurationSession.getCachedGlobalConfiguration(admin);