Hi Mehmet,
thanks for replying.
The only thing I'm using Hazelcast for is locking, hence the only
smethod I'm using is Hazelcast.getLock(aString). There is no other
interaction between my code and Hazelcast apart from this (obviously I
acquire and eventually release the returned lock as well).
I setup Hazelcast via Spring, and this is the only relevant part:
<hz:hazelcast id="salHazelcastCluster">
<hz:config>
<hz:group name="${hzc.group}" password="${hzc.pwd}"/>
<hz:properties>
<hz:property
name="hazelcast.shutdownhook.enabled">true</hz:property>
<hz:property name="hazelcast.jmx">true</hz:property>
<hz:property name="hazelcast.jmx.detailed">true</
hz:property>
<hz:property
name="hazelcast.merge.first.run.delay.seconds">
${hzc.merge.first.run.delay.seconds}
</hz:property>
<hz:property
name="hazelcast.merge.next.run.delay.seconds">
${hzc.merge.next.run.delay.seconds}
</hz:property>
<hz:property name="hazelcast.logging.type">
${hzc.logging.type}
</hz:property>
</hz:properties>
<hz:network port="${hzc.port}"
port-auto-increment="$
{hzc.portAutoIncrement}">
<hz:join>
<hz:multicast enabled="false"/>
<hz:tcp-ip enabled="true">
<hz:members>${hzc.tcpMembers}</hz:members>
</hz:tcp-ip>
</hz:join>
</hz:network>
</hz:config>
</hz:hazelcast>
<bean id="distributedLockManager"
class="com.foo.bar.HazelcastLockManager"/>
NB: port auto-increment is false.
The first bean initializes Hazelcast itself, whilst the second one is
a really simple proxy that hides the Hazelcast API:
public class HazelcastLockManager implements LockManager {
@Override
public Lock getLock(String lockId) {
return Hazelcast.getLock(lockId);
}
}
Thus, considering the system is bootstrapped via Spring using the
Hazelcast Spring-dialect, do you still consider possible to have more
than one Hazelcast instance running?
Apart from that, however, my original concern was about that multicast-
related thread being active despite my configuration.
Thanks in advance for the support,
Francesco
On Jun 5, 11:35 am, Mehmet Dogan <
meh...@hazelcast.com> wrote:
> I have just tried using both Hazelcast 1.9.4 and 2.1, but had no success to
> reproduce this issue.
>
> Are you using static/default Hazelcast methods (Hazelcast.getMap(name),
> Hazelcast.getDefaultInstance() .. etc) in your code? Thread name
> (hz.2.MulticastThread) in your dump says there are at least two instances
> in the same JVM.
>
> Can you please post a test case and config file to reproduce issue?
>
> @mmdogan
>