无法从Java连接到远程Geode群集

无法从Java连接到远程Geode群集,java,gemfire,geode,Java,Gemfire,Geode,我使用下面的代码连接到远程Geode群集 ClientCache clientCache = new ClientCacheFactory().addPoolLocator("www.abc.com", 10334).create(); Region<String, Customer> region = clientCache.getRegion("customers"); System.out.println("region => " + region);

我使用下面的代码连接到远程Geode群集

ClientCache clientCache =
        new ClientCacheFactory().addPoolLocator("www.abc.com", 10334).create();

Region<String, Customer> region = clientCache.getRegion("customers");
System.out.println("region => " + region);
ClientCache ClientCache=
新建ClientCacheFactory().addPoolLocator(“www.abc.com”,10334).create();
Region Region=clientCache.getRegion(“客户”);
System.out.println(“region=>”+region);
注意:www.abc.com:10334可从我的机器访问

日志显示连接到LocalRegion的区域


我应该如何连接到远程大地测量群集区域?我不想使用Spring数据。

您需要确保创建的是
代理
代理缓存
区域。使用类似以下内容:

clientCache
  .createClientRegionFactory(ClientRegionShortcut.PROXY)
  .create("customers");

用下面的代码解决了这个问题

 ClientCache clientCache =
          new ClientCacheFactory().set("cache-xml-file", "cache.xml").create();
 customerRegion = clientCache.getRegion("customers")

谢谢我使用了代理&获取异常org.apache.geode.cache.RegionExistsException:/customers。并且该区域已经使用gfsh在服务器中创建。有可能得到这个地区吗?