Play Scala with JMX
This is a sample Play application that exposes
HomeController through JMX and the cyclic buffer from Logback, and renders it by querying Jolokia as a client.
This is a companion piece to Controlling Logging in a Running JVM.
Note that the way that Logback work means that if you want to get a dump of debugging or tracing data while still having a controller set to INFO level, using an appender won't help. Ringbuffer logging through a turbofilter is the way to go there, but that's a bit off track for this example.
Start the play application in production mode:
JMX Display Options
The Play application will be available under
play.core.server.ProdServerStart for the GUI tools.
Zulu Mission Control
Zulu Mission Control is a rebranded version of Java Mission Control. MBeans functionality is out of the box.
TabularData is rendered a little differently than in Zulu Mission Control.
Hawt is an application server that connects to Jolokia and gives an HTML admin UI.
You can control the JVM and see how the GC is running by running Hawt in another console window:
java -jar hawt/hawtio-app-2.8.0.jar
Or by running ./run-hawt.
Once hawt is up and running, add the connection as "http://localhost:8778/jolokia" and from there you can see the play beans.
Note that Hawt doesn't do well when displaying tabular data, as seen through the CyclicBuffer.