log.info("TomcatRealm not defined in carbon.xml. Using default: memory");
tomcatRealm = "UserManager";
}
if (tomcatRealm.equalsIgnoreCase("memory")) {
log.info("Using memory based TomcatRealm");
MemoryRealm memoryRealm = new MemoryRealm();
String tomcatUsersXml = CarbonUtils.getCarbonConfigDirPath() + File.separator +
"tomcat-users.xml";
if (new File(tomcatUsersXml).exists()) {
memoryRealm.setPathname(tomcatUsersXml);
tomcat.setDefaultRealm(memoryRealm);
} else {
String msg = "TomcatRealm has been set to memory in carbon.xml, but " +
tomcatUsersXml + " file cannot be found";
log.fatal(msg);