Enable JMX Remote port in WebSphere


By default JMX remote port is not enabled in WebSphere, We have to manually enable the JMX remote port. Here I am giving some steps to enable the JMX remote port in Websphere.

This has been done with Websphere 7.0.
After installation of web sphere application server 7.0, fallow the fallowing steps to configure Remote JMX port.

STEP 1:
Login to Admin console of the web sphere any profile(server), short cut will be available in start menu programs.
deploy the PerfServletApp.ear application if not deployed already.
GO TO Applications IN LEFT PANE CLICK WebSphere Enterpise Applications TO CHECK PerfServletApp.ear IS DEPLOYED OR NOT.
IF NOT THEN CLICK New Application UNDER Applications. BROWSE FROM WebSphere directory -> AppServer -> InstallableApps.
FOLLOW THE STEPS.
STEP 2:
Enable the PMI Data and set all the statistics enabled.
GO TO Monitoring and Tuning IN LEFT PANE CLICK ON Performance Monitoring Infrastructure(PMI) IN CONIFGURATION TAB ENABLE THE PMI AND
SET THE ALL STATISTICS. ALSO SET THE ALL STATISTICS IN Runtime Tab. SAVE THE CHANGES.

STEP 3:

Set the generic jvm argument = -Djavax.management.builder.initial= -Dcom.sun.management.jmxremote

in Severs -> Server Types -> WebSphere Application Servers
shows the servers list. click on the server you want.
In the right pane -> Server Infrastructure -> Java and Process Management  click on Process definition, again in Additional Properties of Configuration tab
click on Java Virtual Machine. put the -Djavax.management.builder.initial= -Dcom.sun.management.jmxremote in Generic Jvm Argument field.
and save changes.

STEP 4:

To enable the JMX remote port open the below properties file and add the code below.

FILE : WebSphere directory \AppServer\java\jre\lib\management\management.properties

CODE :
com.sun.management.jmxremote.port=9001
com.sun.management.jmxremote.ssl=false
com.sun.management.jmxremote.authenticate=false

STEP 5:

SAVE THE MASTER DATA AND STOP THE SERVER AND START THE SERVER TO LOAD THE CHANGES………

Enabling JMX port in JBOSS


By default JMX port is not enabled in the JBOSS. If you want enable the JMX port, add the falowing properties
in run.bat file which located in bin directory of the %CATALINA_HOME%.

set JAVA_OPTS= %JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl
-Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port=8007
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

To add the above propertis in run.bat fallow the steps

1. Find for the fallowing code:

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

2. Replace the above code with :

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl -Djboss.platform.mbeanserver -Dcom.sun.management.jmxremote.port=8007 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

Enabling JMX port in Tomcat


By default JMX port is not enable in the Tomcat.
If you want to enable the JMX port, add the fallowing properties
in catalina.bat file which located in bin directory of the %CATALINA_HOME%.

Add the fallowing properties as starting line of catalina.bat

set JAVA_OPTS= %JAVA_OPTS% -Dcom.sun.management.jmxremote.port=7009
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false