Hazelcast creates 3 nodes/members when configured

2019-09-17 20:58发布

问题:

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.

回答1:

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>