(!"jbosscache".equals(root.getLocalName()) ||
(!RootElementBuilder.JBOSSCACHE_CORE_NS_31.equals(coreNamespace) &&
!RootElementBuilder.JBOSSCACHE_CORE_NS_30.equals(coreNamespace))
))
{
throw new ConfigurationException("Expected root element <jbosscache />" + (isValidating() ? " in either {" +
RootElementBuilder.JBOSSCACHE_CORE_NS_30 + "} or {" + RootElementBuilder.JBOSSCACHE_CORE_NS_31 + "} namespaces" : ""));
}
try
{
configureLocking(getSingleElement("locking"));
configureTransaction(getSingleElement("transaction"));
configureClustering(getSingleElement("clustering"));
configureSerialization(getSingleElement("serialization"));
configureInvalidation(getSingleElement("invalidation"));
configureStartup(getSingleElement("startup"));
configureShutdown(getSingleElement("shutdown"));
configureJmxStatistics(getSingleElement("jmxStatistics"));
configureEviction(getSingleElement("eviction"));
configureCacheLoaders(getSingleElement("loaders"));
configureCustomInterceptors(getSingleElement("customInterceptors"));
configureListeners(getSingleElement("listeners"));
configureInvocationBatching(getSingleElement("invocationBatching"));
}
catch (Exception e)
{
throw new ConfigurationException("Unexpected exception while parsing the configuration file", e);
}
return config;
}