To properly propagate the LazyMBeanServer to all jboss mbeans in preRegister, the
LazyMBeanServer has to be passed in to the MBeanServerImpl ctor as the outer argument. Its
a one line change to do this in LazyMBeanServer.resetToJBossServer to pass the
registeredServer:
| public static MBeanServer resetToJBossServer(MBeanServer server)
| throws Exception
| {
| MBeanServer coreServer = server;
| if( theDelegate != null )
| {
| Class[] sig = {String.class, MBeanServer.class, MBeanServerDelegate.class};
| Object[] args = {defaultDomain, registeredServer, theDelegate};
|
With this change, I can use twiddle to query the platform mbeans:
| [starksm@succubus bin]$ twiddle.sh query 'java.lang:*'
| java.lang:type=Compilation
| java.lang:type=MemoryManager,name=CodeCacheManager
| java.lang:type=GarbageCollector,name=Copy
| java.lang:type=MemoryPool,name=Eden Space
| java.lang:type=Runtime
| java.lang:type=ClassLoading
| java.lang:type=MemoryPool,name=Survivor Space
| java.lang:type=Threading
| java.lang:type=GarbageCollector,name=MarkSweepCompact
| java.lang:type=OperatingSystem
| java.lang:type=Memory
| java.lang:type=MemoryPool,name=Code Cache
| java.lang:type=MemoryPool,name=Tenured Gen
| java.lang:type=MemoryPool,name=Perm Gen
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4130258#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...