1

I have project with Hazelcast & Ignite dependencies. And Ignite actually not started/used (there is property that switches Ignite & Hazelcast at app start). A Hazelcast's client is used which connects to the cluster. Used for storage (not cache).

It's okay when javamelody is disabled. But when I try to use javamelody and open a webpage. Ignite starts (seems like even not a just client). The Hazelcast cache manager tries to start and eventually throws an exception (not configured, so everything is fine). So, actually javamelody do not works at this case.

Do you know some hack to disable starting of Ignite/Hazelcast cache managers when javamelody enabled?

Timur Efimov
  • 358
  • 2
  • 10

1 Answers1

1

It has a long history: https://github.com/javamelody/javamelody/issues/858 https://github.com/javamelody/javamelody/issues/962

Maybe you can try to put Hz/Ignite in a different class loader than Java Melody?

alamar
  • 18,729
  • 4
  • 64
  • 97
  • Thanks for the suggestion. Have you tried this? I have no experience using different classloaders. If I understand correctly, you are suggest to create an instances of "URLClassLoader" for Ignite/Hazelcast libs and works with their classes through reflection? Sounds scary. – Timur Efimov Dec 19 '20 at 01:51
  • I did not implement this directly, but it should work. I don't see how you have any other options here. – alamar Dec 21 '20 at 09:25
  • In fact when javamelody call CacheManager, Ignite create a CacheManager, with default config. And that creates ignite Instance whith name CacheManager_0 (for the default configuration) and starting it... – Mr_Thorynque Apr 04 '22 at 11:26