此内容没有您所选择的语言版本。
21.5. Enable JMX for CacheManagers
At the
CacheManager
level, JMX statistics can be enabled either declaratively or programmatically, as follows.
Enable JMX Declaratively at the CacheManager Level (Library mode)
Add the following in the <global> element to enable JMX declaratively at the CacheManager
level:
<globalJmxStatistics enabled="true"/>
<globalJmxStatistics enabled="true"/>
Enable JMX Programmatically at the CacheManager Level (Library mode)
Add the following code to programmatically enable JMX at the CacheManager
level:
GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder()..globalJmxStatistics().enable().build();
GlobalConfiguration globalConfiguration = new
GlobalConfigurationBuilder()..globalJmxStatistics().enable().build();
Enable JMX Declaratively at the CacheManager Level (Remote Client-Server mode)
Add the following code to declaratively enable JMX at the CacheManager
level:
<cache-container name="local" default-cache="default" statistics="true">
<cache-container name="local" default-cache="default" statistics="true">