简体   繁体   English

从区域查询数据时使用spring数据gemfire存储库功能时出现问题

[英]issue while using spring data gemfire repository functionality while querying data from region

We use a third party library to get data from an external gemfire cache cluster. 我们使用第三方库从外部gemfire缓存集群获取数据。 We also connect to our own gemfire cache cluster. 我们还连接到我们自己的gemfire缓存集群。 We use client cache to connect to our cluster and the third party library has its own client cache defined in its own application context. 我们使用客户端缓存连接到集群,并且第三方库在其自己的应用程序上下文中定义了自己的客户端缓存。

The third party library does not use "spring data gemfire repository" functionality whereas we do. 第三方库不使用“ Spring Data gemfire存储库”功能,而我们使用。 We are facing issues while querying our cache using the "Spring data gemfire repository" functionality depending upon the order in which the application context's gets loaded. 在使用“ Spring数据gemfire存储库”功能查询缓存时,我们面临问题,具体取决于应用程序上下文的加载顺序。 If our context gets loaded first then everything works where if the third party gets loaded first then our query call fails though save works fine. 如果先加载我们的上下文,那么一切都可以进行,如果先加载第三方,则我们的查询调用将失败,尽管保存可以正常进行。

On debugging what I found was in the later case, the default-pool referred to in the query-service points to the third party cluster and hence does not have our regions. 在调试时发现的是在后一种情况下,查询服务中引用的默认池指向第三方群集,因此没有我们的区域。

Due to enterprise constraints we do not have control over the order in which the application context gets loaded. 由于企业的限制,我们无法控制应用程序上下文的加载顺序。 Is there any way we can customize the default pool being used so that even if the third party app context gets loaded we are still able to override the default pool to point to our locator pool rather than any other? 有什么方法可以自定义所使用的默认池,以便即使加载了第三方应用程序上下文,我们仍然能够覆盖默认池以指向我们的定位器池,而不是其他任何池?

您可以使用pool-name属性将与存储库关联的客户端区域配置为使用单独的池。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM