0 Replies Latest reply on May 12, 2003 8:32 PM by Greg

    TxCapsule / thread creation

    Greg Newbie


      I was given a job of fixing a memory leak in a program, and have a question as a result of using JProbe to track down the leak.

      The program being checked was creating it's own Thread instances, which org.jboss.tm.TxCapsule and NDC (from log4j) both then held references to.

      The Threads being created were being instantiated within the EJB layer -- which is not allowed I think.

      The Thread created could then no longer be garbage collected since NDC + TxCapsule held references. I don't know how the log4j NDC class + the JBoss TxCapsule classes obtain a reference to the application created thread.

      I thought that a fix could be to move Thread creation into a Servlet, which I think is allowed under the J2EE spec.

      Can anyone shed some light on how/why TxCapsule might acquire a reference to application created threads?