From 9139b5a091d41069d0ffdf30ca99d402a91e11de Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Mon, 22 Aug 2011 19:59:06 +0300 Subject: [PATCH] SGF-62 + improved detection of clients w/o pools --- .../org/springframework/data/gemfire/GemfireTemplate.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/springframework/data/gemfire/GemfireTemplate.java b/src/main/java/org/springframework/data/gemfire/GemfireTemplate.java index 03175278..a2767218 100644 --- a/src/main/java/org/springframework/data/gemfire/GemfireTemplate.java +++ b/src/main/java/org/springframework/data/gemfire/GemfireTemplate.java @@ -27,7 +27,6 @@ import org.springframework.dao.DataAccessException; import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; -import org.springframework.util.StringUtils; import com.gemstone.gemfire.GemFireCheckedException; import com.gemstone.gemfire.GemFireException; @@ -39,6 +38,7 @@ import com.gemstone.gemfire.cache.query.Query; import com.gemstone.gemfire.cache.query.QueryInvalidException; import com.gemstone.gemfire.cache.query.QueryService; import com.gemstone.gemfire.cache.query.SelectResults; +import com.gemstone.gemfire.internal.cache.LocalRegion; /** * Helper class that simplifies GemFire data access code and converts {@link GemFireCheckedException} and @@ -304,7 +304,7 @@ public class GemfireTemplate extends GemfireAccessor { */ protected QueryService lookupQueryService(Region region) { if (region.getRegionService() instanceof ClientCache - && (!StringUtils.hasText(region.getAttributes().getPoolName())) + && (region instanceof LocalRegion && !((LocalRegion) region).hasServerProxy()) && Scope.LOCAL.equals(region.getAttributes().getScope())) { return ((ClientCache) region.getRegionService()).getLocalQueryService(); }