"Unknown configuration name: " + childName);
}
}
// Configure login limits
ConnectionConfigFactory connectionConfig = new ConnectionConfigFactory();
if (StringUtils.hasText(element.getAttribute("max-logins"))) {
connectionConfig.setMaxLogins(SpringUtil.parseInt(element,
"max-logins"));
}
if (StringUtils.hasText(element.getAttribute("max-threads"))) {
connectionConfig.setMaxThreads(SpringUtil.parseInt(element,
"max-threads"));
}
if (StringUtils.hasText(element.getAttribute("max-anon-logins"))) {
connectionConfig.setMaxAnonymousLogins(SpringUtil.parseInt(element,
"max-anon-logins"));
}
if (StringUtils.hasText(element.getAttribute("anon-enabled"))) {
connectionConfig.setAnonymousLoginEnabled(SpringUtil.parseBoolean(
element, "anon-enabled", true));
}
if (StringUtils.hasText(element.getAttribute("max-login-failures"))) {
connectionConfig.setMaxLoginFailures(SpringUtil.parseInt(element,
"max-login-failures"));
}
if (StringUtils.hasText(element.getAttribute("login-failure-delay"))) {
connectionConfig.setLoginFailureDelay(SpringUtil.parseInt(element,
"login-failure-delay"));
}
factoryBuilder.addPropertyValue("connectionConfig", connectionConfig.createConnectionConfig());
BeanDefinition factoryDefinition = factoryBuilder.getBeanDefinition();
String factoryName = parserContext.getReaderContext().generateBeanName(factoryDefinition);