|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.jmx.JmxRegistrationManager
public class JmxRegistrationManager
Registers all the MBeans from an Cache instance to a MBeanServer.
It iterates over all the components within ComponentRegistry and registers all the components
annotated with ManagedAttribute, ManagedOperation or/and MBean.
If no MBean server is provided, then the ManagementFactory.getPlatformMBeanServer()
is being used.
Note that by default object names used are prefixed with jboss.cache:service=JBossCache. While this format works for and is consistent with JBoss AS and the JMX console, it has been known to cause problems with other JMX servers such as Websphere. To work around this, you can provide the following VM system property to override this prefix with a prefix of your choice: -Djbosscache.jmx.prefix=JBossCache
Field Summary | |
---|---|
static String |
JMX_RESOURCE_KEY
Key for every Dynamic mbean added. |
static String |
LOCAL_CACHE_PREFIX
default ObjectName for non clustered caches. |
static String |
REPLICATED_CACHE_PREFIX
default ObjectName for clusterd caches. |
Constructor Summary | |
---|---|
JmxRegistrationManager(Cache cache)
|
|
JmxRegistrationManager(Cache cache,
ObjectName objectNameBase)
Defaults to platform to platform MBeanServer. |
|
JmxRegistrationManager(MBeanServer mBeanServer,
Cache cache,
ObjectName objectNameBase)
C-tor. |
|
JmxRegistrationManager(MBeanServer mBeanServer,
Cache cache,
String objectNameBase)
|
Method Summary | |
---|---|
String |
getObjectName(String resourceName)
|
String |
getObjectNameBase()
|
void |
registerAllMBeans()
Performs the MBean registration. |
void |
unregisterAllMBeans()
Unregisters all the MBeans registered through registerAllMBeans() . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REPLICATED_CACHE_PREFIX
public static final String LOCAL_CACHE_PREFIX
public static final String JMX_RESOURCE_KEY
Constructor Detail |
---|
public JmxRegistrationManager(MBeanServer mBeanServer, Cache cache, ObjectName objectNameBase)
mBeanServer
- the server where mbeans are being registeredcache
- cache that needs to be monitoredobjectNameBase
- path in the MBeanServer where to register cache MBeanspublic JmxRegistrationManager(MBeanServer mBeanServer, Cache cache, String objectNameBase)
IllegalArgumentException
- if the supplied objectNameBase name isn't validJmxRegistrationManager(javax.management.MBeanServer, org.jboss.cache.Cache, javax.management.ObjectName)
public JmxRegistrationManager(Cache cache, ObjectName objectNameBase)
ManagementFactory.getPlatformMBeanServer()
,
platform MBeanServerpublic JmxRegistrationManager(Cache cache)
Method Detail |
---|
public void registerAllMBeans() throws CacheException
CacheException
public void unregisterAllMBeans() throws CacheException
registerAllMBeans()
.
CacheException
public String getObjectName(String resourceName)
public String getObjectNameBase()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |