[id='name_cache_managers-{context}']
= Naming Multiple Cache Managers
In cases where multiple {brandname} Cache Managers run on the same JVM, you
should uniquely identify each Cache Manager to prevent conflicts.

.Procedure

* Uniquely identify each cache manager in your environment.

For example, the following examples specify "Hibernate2LC" as the cache manager
name, which results in a JMX MBean named `org.infinispan:type=CacheManager,name="Hibernate2LC"`.

.Declaratively

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


.Programmatically

[source,java]
----
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder()
  .cacheManagerName("Hibernate2LC")
  .jmx().enable()
  .build();
----

.Reference

* link:{javadocroot}/org/infinispan/configuration/global/GlobalConfigurationBuilder.html[GlobalConfigurationBuilder]
* link:{configdocroot}[{brandname} Configuration Schema]
