Este contenido no está disponible en el idioma seleccionado.
Chapter 18. Monitoring
generate_statistics property in the configuration.
18.1. About Java Management Extensions (JMX) Copiar enlaceEnlace copiado en el portapapeles!
MBeans.
18.1.1. Using JMX with Red Hat JBoss Data Grid Copiar enlaceEnlace copiado en el portapapeles!
18.1.2. Enable JMX for Cache Instances Copiar enlaceEnlace copiado en el portapapeles!
Add the following code to programmatically enable JMX at the cache level:
Configuration configuration = new ConfigurationBuilder().jmxStatistics().enable().build();
Configuration configuration = new
ConfigurationBuilder().jmxStatistics().enable().build();
18.1.3. Enable JMX for CacheManagers Copiar enlaceEnlace copiado en el portapapeles!
CacheManager level, JMX statistics can be enabled either declaratively or programmatically, as follows.
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();
18.1.4. Multiple JMX Domains Copiar enlaceEnlace copiado en el portapapeles!
CacheManager instances exist on a single virtual machine, or if the names of cache instances in different CacheManagers clash.
CacheManager in manner that allows it to be easily identified and used by monitoring tools such as JMX and JBoss Operations Network.
Add the following code to set the CacheManager name programmatically:
GlobalConfiguration globalConfiguration = new
GlobalConfigurationBuilder().globalJmxStatistics().enable().
cacheManagerName("Hibernate2LC").build();
GlobalConfiguration globalConfiguration = new
GlobalConfigurationBuilder().globalJmxStatistics().enable().
cacheManagerName("Hibernate2LC").build();
18.1.5. Registering MBeans in Non-Default MBean Servers Copiar enlaceEnlace copiado en el portapapeles!
getMBeanServer() method returns the desired (non default) MBeanServer.
Add the following code:
GlobalConfiguration globalConfiguration = new
GlobalConfigurationBuilder().globalJmxStatistics().enable().
mBeanServerLookup("com.acme.MyMBeanServerLookup").build();
GlobalConfiguration globalConfiguration = new
GlobalConfigurationBuilder().globalJmxStatistics().enable().
mBeanServerLookup("com.acme.MyMBeanServerLookup").build();