+ add fall back to default for cache property in replicated ns

SGF-10
SGF-12
This commit is contained in:
costin
2010-08-26 22:17:17 +03:00
parent 8e0ffe50e9
commit fd86cc00af

View File

@@ -51,12 +51,15 @@ class ReplicatedRegionParser extends AbstractSingleBeanDefinitionParser {
builder.addPropertyValue("scope", Scope.DISTRIBUTED_ACK);
ParsingUtils.setPropertyValue(element, builder, "name", "name");
ParsingUtils.setPropertyValue(element, builder, "cache-ref", "cache");
String attr = element.getAttribute("cache-ref");
// add cache reference (fallback to default if nothing is specified)
builder.addPropertyReference("cache", (StringUtils.hasText(attr) ? attr : "cache"));
// add attributes
AttributesFactory af = new AttributesFactory();
String attr = element.getAttribute("publisher");
attr = element.getAttribute("publisher");
if (StringUtils.hasText(attr)) {
af.setPublisher(Boolean.valueOf(attr));
}