当配置为Hibernate L2缓存时,Hazelcast创建3个节点/成员 [英] Hazelcast creates 3 nodes/members when configured as Hibernate L2 cache

查看:273
本文介绍了当配置为Hibernate L2缓存时,Hazelcast创建3个节点/成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hazelcast在配置为Hibernate L2缓存时创建3个节点/成员。



为什么?我如何控制它?



我使用默认配置和Grails 2.2.3的Hazelcast 3.2.6。

解决方案

您可以为Hibernate配置中使用的所有Hazelcast实例设置一个instanceName。然后,所有将重用相同的HazelcastInstance(由名称引用)。



要设置实例名称,请使用Hibernate配置中的以下属性将所有设置为相同的值:

  hibernate.cache.hazelcast.instance_name 

设置为:

 < property name =hibernate.cache.hazelcast。 INSTANCE_NAME> COMMON_NAME< /性> 


Hazelcast creates 3 nodes/members when configured as Hibernate L2 cache.

Why? How do I control this?

I am using Hazelcast 3.2.6 with default configuration and Grails 2.2.3.

解决方案

You can set up an instanceName for all Hazelcast instances used in the Hibernate configurations. Then all will reuse the same HazelcastInstance (referred to by the name).

To set the instance name please use the following property in the Hibernate config all set to the same value:

hibernate.cache.hazelcast.instance_name

Set as:

<property name="hibernate.cache.hazelcast.instance_name">common_name</property>

这篇关于当配置为Hibernate L2缓存时,Hazelcast创建3个节点/成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆