+ fix region initialization
This commit is contained in:
Costin Leau
2011-09-02 19:50:12 +03:00
parent 47535bff81
commit 08a6e20660
5 changed files with 21 additions and 8 deletions

View File

@@ -63,12 +63,13 @@ public class RegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V> imple
private RegionAttributes<K, V> attributes;
private Scope scope;
private DataPolicy dataPolicy;
private Region<K, V> region;
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
region = getRegion();
postProcess(region);
}

View File

@@ -43,7 +43,7 @@ public class RegionLookupFactoryBean<K, V> implements FactoryBean<Region<K, V>>,
private GemFireCache cache;
private String name;
Region<K, V> region;
private Region<K, V> region;
public void afterPropertiesSet() throws Exception {
Assert.notNull(cache, "Cache property must be set");
@@ -111,4 +111,8 @@ public class RegionLookupFactoryBean<K, V> implements FactoryBean<Region<K, V>>,
public void setName(String name) {
this.name = name;
}
protected Region<K, V> getRegion() {
return region;
}
}

View File

@@ -61,13 +61,13 @@ public class ClientRegionFactoryBean<K, V> extends RegionLookupFactoryBean<K, V>
private DataPolicy dataPolicy;
private RegionAttributes<K, V> attributes;
private Region<K, V> region;
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
region = getRegion();
postProcess(region);
}