0 Replies Latest reply: Jun 13, 2008 12:03 PM by 807578 RSS

    J2EE applet clean-up help

    807578
      I'm not sure if I'm posting this in the right thread, so, if not, I'd appreciate if someone could point me in the right direction.

      I am currently a developer on a multi-threaded J2EE webapp that uses an browser-embedded applet as its front end. A user is required to log-in in order to use the applet. On "logout" or "kill session", the applet redirects the browser to an appropriate page describing what happened.

      We started running into problems with the client browser running out of memory when a user logs in and out multiple times. Every time they log in, the browser's memory usage jumps up about 10 megs each time. After this happens enough times, the applet will start to throw "out of memory" errors. It doesn't matter if the same user logs in and out multiple times, or it's a different user each time. The same thing happens.

      Clearly, we're having some issues cleaning up. Diving a bit deeper, we discovered that there are a couple of threads hanging around which are associated to the applet after the applet is destroyed, and these seem to be the source of the problem.

      Does anyone have any suggestions as to how to guarantee that all threads and objects owned by the applet are destroyed when logging out?

      I'd appreciate any advice, and I'd be happy to answer any questions that might help solve the problem.

      Thanks in advance!