On 6/7/06, FWang <[EMAIL PROTECTED]> wrote:
I ran JProbe on karthik's code and I suspect that MessageDispath has the memory leak. Please see the attached screen shot from "Memory Leak Detector" in JProbe.
Thanks for doing that! Though I don't really understand the pictures; if my reading of them is correct the test program has created 124596 JMS Session objects; I'm not surprised that ran out of RAM - thats a massive number of sessions; you generally only need at most one per thread. JMS Sessions are created by JMS client code - they are not controlled by the JMS provider - so if too many of those are created I suspect its your application code thats at fault. Also imagine when you start consuming topics on that many sessions; each consumer on the session will receive its own copy of the message - then we prefech a few thousand messages by default per consumer - so running out of RAM with that configuration doesnt' seem like a memory leak - it seems like normal behaviour. http://incubator.apache.org/activemq/what-is-the-prefetch-limit-for.html (Unless the number next to the objects in the pictures is not the number of instances created in which case please disregard this entire email :) -- James ------- http://radio.weblogs.com/0112098/
