For Jolokia to work, an agent must be deployed, the one way or the other. But this is a common business:
On the other hand, setting up JSR-160 connectors are not that easy as it might appear. There are various kind of issues like problems when using different JDK versions on client and server side or exposing the PlatformMBeanServer. On our blog, detailed analysis for JSR-160 setup for Weblogic and JBoss has been posted.
Once the agent has been installed, using Jolokia on the client side is easy. Since the protocol relies on a standard protocol (HTTP) and format (JSON), it is easy for non-Java systems to access MBeans. It can be even accessed from within the browser with a simple URL. Although this is still a bit cryptic, it is a good test to check the installation of Jolokia.
Assuming that the agent is reachable under http://localhost:8080/jolokia, memory usage can be checked with the browser:
The actual value is contained in the returned JSON representation under the key value. In this example, a so called path (i.e. used) is appended to the URL which allows for deep access in more complex Java types (CompositeData in this case).