hazelcast / hazelcast-hibernate

A distributed second-level cache for Hibernate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache IMaps not visible in JMX

kenwdelong opened this issue · comments

I have turned on JMX with

<properties>
	<property name="hazelcast.jmx">true</property>
</properties>

When I start my app, I see that the cache is working by re-running the same query and noting that the SQL is only issued the first time, and Hibernate indicates it found the entry in the cache. However, when I look in JMX, the only bean I can find is the ITopic associated with the cached type (presumably for invalidation events) but I cannot see the IMap that holds the actual cache entries.

This is important because I want to evaluate my cache performance, and also because there are times when I need to clear the caches (data updated in db directly) without bouncing all the servers.

I'm using Spring Boot 2.0.1, Hibernate 5.2.16, and hazelcast-hibernate52 1.2.3 (hazelcast 3.9.3).

Hi @kenwdelong,

It seems you're using HazelcastLocalCacheRegionFactory. In that case, it's normal that you don't see any maps on JMX (or on Hazelcast Management Center) because no distributed maps are being created. See this section of documentation. The following is also true for JMX:

NOTE: If you use HazelcastLocalCacheRegionFactory, you cannot see your maps on Management Center.

Feel free to post any further questions to our Google Group -> https://groups.google.com/forum/#!forum/hazelcast