This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 266
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: 41621
    
  55
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: 266
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: 41621
    
  55
No, if jconsole is started after SimpleAgent, then it should list it right away.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266

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