Bozho
Bozho

Reputation: 597234

Using jamon.war on tomcat

I'm using JAMon, and I want to use the jamon.war to monitor my app. However, my app and the jamon.war app have different classloaders, and therefore they don't see each other's static variables (where the data is stored, as far as I understand). I am getting the proper data when I call MonitorFactory.getReport() in my app.

How to get this working?

Upvotes: 5

Views: 1904

Answers (1)

Bozho
Bozho

Reputation: 597234

The problem was that I had jamon-xx.jar in my WEB-INF/lib. When I remove it (and have it only in tomcat's lib dir), it is loaded by the tomcat classloader (which I guess is a parent of all application classloaders), and so the two applications can share the static fields.

Upvotes: 4

Related Questions