Completed Peer Cache Region Template testing for JIRA feature requests SGF-207 and SGF-254 adding support for template-defined Regions.

This commit is contained in:
John Blum
2014-08-27 00:04:39 -07:00
committed by John Blum
parent dab04833c9
commit 5919d87658
6 changed files with 588 additions and 280 deletions

View File

@@ -163,8 +163,8 @@ public class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V> imple
}
if (attributes != null) {
Assert.state(!attributes.isLockGrantor() || scope.isGlobal(),
"Lock Grantor only applies to a global scoped region.");
Assert.state(!attributes.isLockGrantor() || (scope == null) || scope.isGlobal(),
"Lock Grantor only applies to a 'GLOBAL' scoped Region.");
}
postProcess(regionFactory);

View File

@@ -375,11 +375,9 @@ abstract class ParsingUtils {
static void parseScope(Element element, BeanDefinitionBuilder builder) {
String scopeAttributeValue = element.getAttribute("scope");
Scope scope = (StringUtils.hasText(scopeAttributeValue)
? Scope.fromString(scopeAttributeValue.toUpperCase().replace("-", "_"))
: Scope.DISTRIBUTED_ACK);
builder.addPropertyValue("scope", scope);
if (StringUtils.hasText(scopeAttributeValue)) {
builder.addPropertyValue("scope", Scope.fromString(scopeAttributeValue.toUpperCase().replace("-", "_")));
}
}
private static boolean parseExpiration(Element rootElement, String elementName, String propertyName,