[id='enable_jmx-{context}']
= Configuring {brandname} to Register JMX MBeans
{brandname} can register JMX MBeans that you can use to collect statistics and
perform administrative operations. However, you must enable statistics
separately to JMX otherwise {brandname} provides `0` values for all statistic
attributes.

.Procedure

* Enable JMX declaratively or programmatically.

.Declaratively

[source,xml,options="nowrap",subs=attributes+]
----
<cache-container>
  <jmx enabled="true" /> <1>
</cache-container>
----

<1> Registers {brandname} JMX MBeans.

.Programmatically

[source,java]
----
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder()
  .jmx().enable() <1>
  .build();
----

<1> Registers {brandname} JMX MBeans.
