Here’s another similar, more visual (and relative easy) approach to check for memory leaks:
Start VisualVM (on the same machine), which you can find in the JDK/bin folder (jvisualvm.exe on Windows).
You should see the Openfire process on the left hand side. Double click to see more info.
- Click “Sampler”, click “Memory”, click “Heap Dump” (maybe also click “Perform GC” first, just to be sure).
Do this right after the start of Openfire.
Then wait some time, until the memory has increased and repeat the step (make another heap dump).
Then click on the second heap dump, click on “Classes” and click “Compare with another heap dump”. In the dialog you select the first heap dump.
You now see the “delta” between both heap dumps and see which classes have increased. Maybe also sort by name and look for org.jivesoftware classes.
Any suspicous increase is visible through the red line in the instances [%] column or generally any unusually high amount of instances of one class is suspicous for a leak.