The Source for Java Technology Collaboration
User: Password:



Kedar Mhaswade's Blog

August 2007 Archives


GlassFish Passwords ...

Posted by km on August 23, 2007 at 09:08 AM | Permalink | Comments (0)

Ryan de Laplante asked me to blog about this intricate issue of passwords for GlassFish administration. I had already written several articles about it and here is an attempt to collate several such articles: Let me know if these are useful.

How to Use JMX to Monitor JVM under GlassFish V1, V2 ...

Posted by km on August 23, 2007 at 08:53 AM | Permalink | Comments (1)

In GlassFish V1 and V2, a JMX Connector Server is always available out of the box. This is how it looks like:
<jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="false"> <ssl cert-nickname="s1as" client-auth-enabled="false" ssl2-enabled="false" ssl3-enabled="true" tls-enabled="true" tls-rollback-enabled="true"/>
</jmx-connector>
What this means is:
  • There is an RMI Registry that's started in process. This acts as a naming service to download the RMI stub from. This is how the "standard" JMX RMI Connector Server (that's integrated into Java SE 5.0) works.
  • One does not have to pass the properties:

    -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

    to the VM.
  • This is a non-secure RMI connection. You have to make sure yourself that you are connecting to the "right" server.
Here is the process (well, not really) to see the JVM MBeans in action:
  • Start the server (asadmin start-domain).
  • Start JConsole and connect to the server thus:
    jconsole-1.jpg
  • Browse to the MBeans tab and see all the JVM Monitoring MBeans yourself.
    jconsole-2.jpg
  • The same data is available in admin console and admin CLI (asadmin get command) when the VM monitoring level is turned to high.




Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds