Skip to content
Play Application using JMX to show logs and components
CSS Scala HTML Java Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

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:

sbt runProd

JMX Display Options

There are three main options, Zulu Mission Control, VisualVM, and Hawt.

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.


VisualVM is a tool for profiling and monitoring the JDK. The MBean support is available as a plugin.

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.

You can’t perform that action at this time.