Hi,
I'm trying to register a MBean inside a java agent. That is, I run JBoss with the 
option 
-javaagent=Foo

where Foo.premain contains

ManagementFactory.getPlatformMBeanServer().registerMBean(obj, objName);

By doing that, I get several exceptions, the first of which is:

12:37:20,590 ERROR [MainDeployer] Initialization failed 
jboss.system:service=MainDeployer
org.jboss.util.NestedRuntimeException: Error creating MBeanProxy: 
jboss.system:type=ServerConfig; - nested throwable: 
(javax.management.InstanceNotFoundException: jboss.system:type=ServerConfig)
        at org.jboss.mx.util.MBeanProxyExt.(MBeanProxyExt.java:77)
        at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:292)
        at org.jboss.mx.util.MBeanProxyExt.create(MBeanProxyExt.java:247)
...

Is it allowed to use ManagementFactory.getPlatformMBeanServer().registerMBean(...)?
If not, how could I register my MBean inside the method premain?

Thanks

Clovis

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3843606#3843606

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3843606


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to