Hi,

I am using JBoss 3.2.7. I have created a helloworld JMX service and deployed 
the .sar. I am having an .ear from where I am trying to call this MBean. 

I tried in the following ways:

      ArrayList servers = MBeanServerFactory.findMBeanServer(null);
                if (servers == null){}
                else{
                MBeanServer server = (MBeanServer)servers.get(0);
                ObjectName objName = new 
ObjectName("helloworld:service=HelloWorld");

This gives an exception saying "helloworld is not registered".

Also,

                        ctx = new InitialContext();
                        MBeanServerConnection server = 
(MBeanServerConnection)ctx.lookup("jmx/invoker/helloworld");

This gives the exception saying "helloworld not bound".

I am able to see and change the attributes of the helloworld MBean via 
jmx-console. But I could not find this MBean in the JNDIViewer. 

Please help me finding out where am I doing wrong. 

Thanks.


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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to