This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 248
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: 39547
    
  27
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 - updated with new look and Ping home screen widget
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 248
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: 39547
    
  27
No, if jconsole is started after SimpleAgent, then it should list it right away.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 248

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
read message from Topic
overriding JDBCRealm
mail send
why JMX can not stop