File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Problem with JMX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem with JMX " Watch "Problem with JMX " New topic
Author

Problem with JMX

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 257
Hello Everybody,
I have written a very simple jmx program. The code is as under.

HelloMBean


Hello


SimpleAgent


The code compiles fine and I run the program SimpleAgent with the commandline option java -Dcom.sun.management.jmxremote SimpleAgent. But when I connect to jmx agent using jconsole tool, it dosen't display any local processes to be monitored.


Why is this happening ?. Please tell me where I am going wrong.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
That's odd. Are you starting jconsole after SimpleAgent, or at least trying to connect after it's been started? If jconsole is already running, and showing the "Connect to agent" dialog, then it won't pick up newly started processes.


Ping & DNS - my free Android networking tools app
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 257
Yeah I am starting JConsole after running SimpleAgent program. Do I have to start jconsole before running the simpleagent program. Please guide me.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
No, if jconsole is started after SimpleAgent, then it should list it right away.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 257

No, if jconsole is started after SimpleAgent, then it should list it right away.


Yeah I am doing that only .... starting jconsole after starting simpleagent.. but jconsole isn't showing up anything ....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JMX
 
Similar Threads
MBean not visible in Jconsole - Help needed
overriding JDBCRealm
read message from Topic
why JMX can not stop
mail send