This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 41181
    
  45
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: 41181
    
  45
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