Thursday, May 15, 2014

How to Configure JRockit Machine Control with Weblogic Server ?


This blog explains about how to configure JRocket Machine Control with Weblogic Server ?

What is JRockit ?

The Oracle JRockit JVM is the industry's highest performing Java Virtual Machine now built into Oracle Fusion Middleware. It brings industry leading real time infrastructure capabilities with JRockit Real Time and unparalleled JVM diagnostics with JRockit Mission Control.


Follow below link to download and install JRocket

Oracle® JRockit Mission Control

- Configure jmx remote port by modifying setDomainEnv.cmd, startWeblogic.cmd and startManagedWeblogic.cmd file as shown below. You should find these files at Middleware Location

for eg : C:\Oracle\Middleware1116\user_projects\domains\fm_domain\bin

setDomainEnv.cmd

SET JAVA_VENDOR=Oracle
set BEA_JAVA_HOME=C:\Program Files\Java\jrockit-jdk1.6.0_45-R28.2.7-4.1.0
set ENABLE_MNGMNT_CONSOLE=true

startWeblogic.cmd

if "%ENABLE_MNGMNT_CONSOLE%"=="true" (
if "%MNGMNT_CONSOLE_OPTIONS%"=="" (
set MNGMNT_CONSOLE_OPTIONS=-Xmanagement:ssl=false,authenticate=false -Dcom.sun.management.jmxremote.port=7091
)
) else (
set MNGMNT_CONSOLE_OPTIONS=
)


set SAVE_JAVA_OPTIONS=%JAVA_OPTIONS% %MNGMNT_CONSOLE_OPTIONS%

If you want to connect to any specific Managed Server instance using JRocket, then you have to modify startManagedWeblogic.cmd as shown below

startManagedWeblogic.cmd

Configure JMX remote ports repeatedly for each individual managed server instance.

if "%1"=="fm_dev" (
  set MNGMNT_CONSOLE_OPTIONS=-Xmanagement:ssl=false,authenticate=false -Dcom.sun.management.jmxremote.port=7092
) else (
if "%1"=="fm_soa_dev" (
set MNGMNT_CONSOLE_OPTIONS=-Xmanagement:ssl=false,authenticate=false -Dcom.sun.management.jmxremote.port=7093
) else (
set MNGMNT_CONSOLE_OPTIONS=-Xmanagement:ssl=false,authenticate=false -Dcom.sun.management.jmxremote.port=7094
)

)

After updating all these three files, Start Weblogic server by running 'startWeblogic.cmd' script, and you notice JMX remote port in console log as highlighted below
After successful configuration of JMX remote port, start JRockit , Choose 'New Connection' as shown below
- Enter the host name, JMX Remote Port name ( Same as configured above). You don't need to provide any login credentials as we already configured above authentication=false. Test the connection, Ensure Status should be 'OK' as shown below. Click on 'Finish'



After successful connection, Right click on the newly created connection and choose 'Start Console' option

Find source code below here

No comments:

Post a Comment