ClassloaderLeakUnitTestCase is showing a classloader leak when the test does remote calls to EJB2 SLSBs. See

      JBoss Profiler analysis (see attached) shows the leak is to the JBossTS ReaperThread – the DelegatingClassLoader for the ejb jar deployment is set as the TCCL on that thread.

      Oddities I observed while trying to track this down:

      1) The leak doesn't occur if JMS is deployed. By mistake I changed the AS config for the test such that JBossMQ no longer gets deployed; that's when the leak appeared. The test doesn't use JMS in any way. Can only speculate that if MQ is running the TCCL on the ReaperThread gets cleared or changed somehow or never gets set to the ejb's DelegatingClassLoader.

      2) The test class includes 3 different tests that basically make the same calls. The differences between the tests is just how the ejbs are packaged – one in a plan jar, one with an ear and the plain jar, one with the ear but a loader-repository configured. Only the first of these that gets executed fails; the other two pass. I changed the order in which the tests execute, and whichever was first failed. Hence the success/failure doesn't appear to be a function of the packaging.

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  jhalliday Jonathan Halliday
                  brian.stansberry Brian Stansberry
                • Votes:
                  0 Vote for this issue
                  1 Start watching this issue


                  • Created: