ziggy
ziggy

Reputation: 15876

Monitoring a J2EE application running in Tomcat with JMX

All,

If i want to enable JMX on Tomcat for monitoring from the same machine, (i.e. not remotely) are these properties still required?

com.sun.management.jmxremote.authenticate=false
com.sun.management.jmxremote.port=12345

Isnt it the case that the authenticate and port number properties are only relevant if monitoring remotely? Do i need the above if monitoring locally?

If the port number is not required, how does the client know who to contact Tomcat? Does it listen to a port number that TOmcat has open by default?

Upvotes: 0

Views: 859

Answers (2)

prasanna jayapalan
prasanna jayapalan

Reputation: 11

Here is a writeup i did on this subject. JMX setup for external access

Upvotes: 0

mindas
mindas

Reputation: 26713

You are correct, these parameters only required when monitoring remote application via JMX. When monitoring locally, you can skip them. Obviously the process needs to be started by the same user.

I think there are some exceptions to this rule, see http://download.oracle.com/javase/1.5.0/docs/guide/management/agent.html#local

Q:"If the port number is not required, how does the client know who to contact Tomcat?"
A: jconsole, jps and the likes simply looks for any Java processes that are running on the system and owned by the same user.

Read here: http://download.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html (chapter about attachable applications).

Upvotes: 2

Related Questions