O'Reilly logo

Learning Spring Boot by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting to the app via JConsole and jmxterm

We can connect via JMX and interrogate them for information. There are multiple tools available, so why not start with JConsole, the one that comes with the JDK already on our system?

In one shell, we need to launch our application as follows:

$ ./gradlew bootRun
...

Somewhere in this console output, there is a debug message containing JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi. Let's save this value so that we can use it further down in this section.

From another shell, launch JConsole as follows:

$ jconsole

A subwindow should pop up. Select Remote Process and enter the address we just found, as shown in the following screenshot:

With the connection string entered, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required