I am trying to use jhat / OQL to track a memory leak in a Tomcat container. The question I want to ask is this:
"Show me all the instances (and sub-instances) of the foo.bar.Cacheable class available from javax.servlet.http.HttpSession"
I managed to come up with the following, but this does not show subclasses of foo.bar.Cacheable (which is important since this is an infact interface).
select filter(reachables(s), "/foo.bar.Cacheable/(classof(it).name)") from javax.servlet.http.HttpSession s
I tried various permutations of the concept below, but just keep getting errors ("foo" is undefined).
select filter(reachables(s), classof(it) instanceof foo.bar.Cacheable) from javax.servlet.http.HttpSession s
Can someone help me with what I am doing wrong to ask this question through OQL?
source share