spring-projects/spring-data-gemfire — pull request #27 by jxblum (2013-09-21 19:25:11+00:00)
Title: Fixed JIRA issue SGF-195 concerning colocated Regions in GemFire configu...

Fixed JIRA issue SGF-195 concerning colocated Regions in GemFire configured with SDG.

Technically, I was looking to fix this issue by adding a dependency on the PartitionedRegion to which the currently parsed PartitionedRegion ( element with the colocated-with attribute) will be colocated with like so...

String colocatedWithBeanName = element.getAttribute("colocated-with");

if (StringUtils.hasText(colocatedWithBeanName)) {
builder.addDependsOn(colocatedWithBeanName);
}

This code snippet would be placed in the PartitionedRegionParser.doParseRegion method. The advantage of this approach is that the spring-gemfire.xsd XML namespace configuration would not have to change (e.g. colocated-with -> colocated-with-ref). However, the top-level bean definitions for Regions (replicate, partitioned, etc) do not set the name attribute as additional bean names along with the ID attribute unlike SubRegions.

I was a bit mixed on approach, but ultimately decided in favor of renaming the colocated-with attributed as this would be consistent with the disk-store-ref attribute on the baseReadOnlyRegionType.