JVM breakglass

Using a Clojure REPL to troubleshoot live Java/JVM processes

breakglass

Author: Mathieu Gauthron

http://slides-euroclojure2014.matlux.net

Agenda

  1. Traditional troubleshooting of a Java application
  2. What is JVM-breakglass?
  3. How does JVM-breakglass work?
  4. How to integrate it in an application?
  5. Live Debugging demo

Troubleshooting a Java application

  1. Debugger
  2. Log/print statements
  3. JMX
  4. Adhoc interactive mechanism

What is JVM-breakglass?

  1. Open Source Maven Library
  2. Integrated on any JVM process
  3. Console onto a JVM process

What are the main JVM-breakglass features?

  1. Interactive prompt
  2. See inside private members
  3. Call arbitrary methods
  4. Creation of new object instances
  5. Creation of new classes
  6. Monitor object state
  7. No need to use Clojure to develop the application

How does it work?

demo diagram

Time for a...

demo

Enterprise Application Diagram

demo diagram
demo http://localhost:8080/SpringMVC/city

Let's take a step back

  1. Interactive prompt
  2. Full JVM introspection
  3. Access private/public members, methods, fields...
  4. Call arbitrary methods
  5. Monitor object state
  6. Creation of new object instances
  7. Overwrite class definition on the fly
  8. No Clojure inside the Java project
questions?

github: https://github.com/matlux/jvm-breakglass

blog: http://www.matlux.net

Twitter: @matluxian