views:

120

answers:

0

Hi All,

I'm trying to use jhat/OQL to trace a memory leak in our Tomcat container. The question I want to ask is:

"Show me all the instances (and sub-instances) of foo.bar.Cacheable class that are reachable from javax.servlet.http.HttpSession"

I managed to come up with the following, but this doesn't show subclasses of foo.bar.Cacheable (which is important since this is infact an 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 not defined).

select filter(reachables(s), classof(it) instanceof foo.bar.Cacheable) from javax.servlet.http.HttpSession s

Can anyone help me out with what I'm doing wrong to pose this question through OQL?

Regards Arun