- Blog Xebia France - -
Posted By Benoit Moussaud One on Thursday, June 28th, 2007 14:57 IN J2EE 9 Comments
JCONSOLE is an available tool from JDK 5.0 who is based on the IPA - INTERNATIONAL PHONETIC ALPHABET JMX to show and to follow the metric of a virtual machine Popular dance.
The different categories are:
There are two ways of linking JCONSOLE on a virtual machine Popular dance 5:
Local mode requires that JCONSOLE and virtual machine are on the same machine. It is then enough to add property to the starting of the virtual machine: -Dcom.sun.management.jmxremote.
Note: From JDK 6, this property is positioned by default, therefore all JVM will be able to be monitor es ' Out Of the Lock-up garage '.
The practicable of JCONSOLE is located in <JAVA_HOME> / bin. In starting, JCONSOLE shows all the accessible JVM.
JMX defines the protocol MINIMUM BENEFIT as protocol of exchange. By default, they consider that there is two realisation of MINIMUM BENEFIT:
The server of applications BEA Weblogic offers an additional realisation (and more competitive), .
The continuation of this ticket itemises shape to be set up for each of three protocols, and advantages and disadvantages of each.
To achieve in JVM by JRMP, it is necessary to add following properties:
Note: Parametres com.sun.management.jmxremote.ssl=false and com.sun.management.jmxremote.authenticate=false introduce a broad fault of security on JVM (neither authentication, nor encryption of exchanged data). The installation of an authentication is possible by defining users' list in the file <Java_Home>. Everything is d tail on ' Luis-Miguel Alventosa' s Blog ': . The encryption by SSL is possible but very heavy to set up (generation of certificates)
With JCONSOLE, there are then two means to be connected:
Advantages: Simplicity of implementation and of connection (Thumb-index ' Remote ').
Disadvantage: Security.
Popular dance MINIMUM BENEFIT OVER IIOP allows of if interfacer with ORB, specified by CORBA (Common Object Request Broker Architecture). The servers of applications certified J2EE has to to support the protocol IIOP (MINIMUM BENEFIT / IIOP). To link JCONSOLE on a server of applications WebLogic 9.x with the protocol IIOP, it is necessary to speed this protocol up and to declare an user to authenticate. Procedure is described . JVM requires to be started with option:
-Dcom.sun.management.jmxremote
In JCONSOLE, he is the following URL needs to use the thumb-index ' Advanced ' and to point out:
service:jmx:rmi:///jndi/iiop://192.168.199.131:7001/weblogic.management.mbeanservers.runtime
Advantage: -
Disadvantages: Complicated to define, complexity linked to the protocol IIOP.
J2EE 1.0 did not impose the support of IIOP. A more competitive possessing protocol GAPED then perfected T3. Since, the protocol T3 is the protocol by default to achieve the different distant objects accommodated on a server of applications WebLogic. Since T3 implements MINIMUM BENEFIT, it is possible to connect JCONSOLE to JVM with T3.
First of all it is needed:
To be connected, it is necessary to use mode ' advanced ' and to point out:
service:jmx:t3://192.168.199.131:7001/jndi/weblogic.management.mbeanservers.runtimeThe user has to have the rights of administration.
After activation of logs and analysis I pointed out that credentials (UserName and Password) was not transferred at the time of the lookup of the object MBEANSERVER. To remedy it, it is enough to write a new ' ClientProvider ' of the protocol T3 who is going to perform this manipulation: transfer of property ' jmx.remote.credentials ' towards ' Java.naming.security.principal ' and ' Java.naming.security.credentials '.
It is then necessary to adjust the line of order (addition of the class fr.xebia.jmx.remote.t3. ClientProvider in the ClassPath and modification of property jmx.remote.protocol.provider.pkgs).
With the same information taken in into the thumb-index ' Advanced ', you will be linked now to your server of applications WebLogic 9 with JCONSOLE by using the protocol T3.
Advantage: No additional definition of parametres (activation of the protocol IIOP and statement to employ IIOP require an upturn of the server).
Disadvantage: It is impossible to connect JCONSOLE before the server is ' Running ', therefore no monitoring of the starting of the server.
JCONSOLE allows fast to see behaviour memo, CPU and treatments of a server of applications. From now on, think of adding '-Dcom.sun.management.jmxremote' on all JVM 5.0 to allow a quick diagnosis in case of problem.
Article printed from Blog Xebia France:
URL to article: / 2007 / 06 / 28 / jconsole-et-weblogic-9 /
Click to print.