How many ports would be opened if JMX were enabled with a Java application?
book
Article ID: KB0090398
calendar_today
Updated On:
Products
Versions
TIBCO BusinessEvents Enterprise Edition
-
Not Applicable
-
Description
Resolution: Description: =========== How many ports would be opened if JMX were enabled with a Java application?
Environment: =========== TIBCO BusinessEvents 3.0.1 HF6 All Operating Systems
Resolution: =========== By default, the JMX RMI connector opens two ports:
The first is for the RMI registry and it is the port that you usually supply with the -Dcom.sun.management.jmxremote.port=<port> property.
The second is used to export JMX RMI connection objects. This port is usually a dynamically allocated random port. You do nott need to know this port number in order to connect to the JMX agent.
This however can prove to be troublesome if your application is behind a firewall that blocks access to random ports. The default JVM agent will not let you specify that second port number. The only way to specify that second port number is to use a JMXServiceURL, but you cannot supply a JMXServiceURL to the default agent. Instead of starting the default JVM agent, using the JDK dynamic agent loading feature create a custom agent and then use the JMXServiceURL object with the desired value for the second port.
Issue/Introduction
How many ports would be opened if JMX were enabled with a Java application?