如何从单个应用程序连接到多个 Oracle Coherence 缓存?
我有一个应用程序(用 CSharp 编写)当前仅连接到一个一致性集群。该集群被输入数据,当应用程序在集群的缓存中看到该数据时,它会使用该数据来获取有关所传递内容的更多信息,然后将其传回集群,然后集群将该数据存储在其第二个缓存中。
我现在想要做的是让应用程序连接到第二个一致性集群,当它在该集群的缓存中看到某些数据时,它应该再次获取该数据并找到有关它的更多信息,然后将其传递回该集群,该集群再次存储该数据位于其二级缓存中。
我遇到的问题是如何配置我的应用程序以连接到两个缓存?
我已经围绕这个问题进行了一些阅读,但答案相互矛盾。一个建议是更改运行时使用的类加载器,但我不确定如何执行此操作,或者这是否是正确/最好的做法?
任何有关此问题的帮助或指导将不胜感激。
编辑:经过更多挖掘后,我发现了这个解释,有人知道这是否是正确的做法吗?
http://forums.oracle.com/forums/thread.jspa?threadID=1518273
I have an application(written in CSharp) which currently connects to just one coherence cluster. This cluster is fed in data and when the application see's this in the cluster's cache it uses this to gain more information on what it was passed and then pass it back to the cluster which then stores this data in its second cache.
What i now want to do is have the application connect to a second coherence cluster and when it sees certain data in this cluster's cache it should once again get this data and find more information on it and then pass it back to this cluster which again stores this data in its secondary cache.
The problem i have is how do i configure my application to connect to two caches?
I've done some reading around this issue with conflicting answers. One suggestion is to change the classloader which is used at run-time, but i'm not sure how to do this, or if this is even the correct/best thing to do??
Any help or guidance on this issue would be much appreciated.
EDIT: After more digging i've found this explaination, does anyone have any ideas on whether or not this is the correct thing to do?
http://forums.oracle.com/forums/thread.jspa?threadID=1518273
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更详细地研究此问题后,上面链接中建议的解决方案似乎正是我们所需要的。您需要作为扩展客户端连接到每个集群(因为您只能成为一个集群的成员,而不必做一些聪明/混乱的事情来更改类加载器),然后添加一些额外的配置来指定另一个集群和缓存配置。一个例子如下:
希望这会帮助其他人,就像它帮助我一样:)
After looking into this in more detail it would appear that the solution suggested in the above link is what is needed. You need to connect to each cluster as an extend client(as you can only be a member of one cluster without having to do some clever/messy stuff changing the class loader) and then add some extra config to specify another cluster and cache configuration. An example would be as follows:
Hopefully this will help someone else like it helped me :)