Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-9474

Asynchronous SLSBs are leaked if they execute too quickly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Open To Community
    • 6.0.0.Final, 6.1.0
    • EJB
    • None
    • Workaround Exists
    • Hide

      Put SLSBs into StrictMax pool instead of default ThreadLocal.

      Show
      Put SLSBs into StrictMax pool instead of default ThreadLocal.
    • Hide

      I have created a small sample WAR file that reproduces the problem. The number of instances of the WorkerBean can be tracked via the JMX console.

      Show
      I have created a small sample WAR file that reproduces the problem. The number of instances of the WorkerBean can be tracked via the JMX console.

      I have created a SLSB which exports a single asynchronous service, and a singleton bean which invokes it via a TimerService. Once every minute, the singleton executes the SLSB 15 times via a loop. If the asynchronous service executes "too quickly" (e.g. 500ms or less) then the asynchronous thread is destroyed and the SLSB is leaked, along with all of its resources. Over time, these SLSB instances force an OutOfMemory exception.

      However, if the asynchronous service is "slow enough" then the asynchronous thread stays in the pool and the SLSB can be reused. This is the behaviour that I want, although I would obviously still want the service to execute as quickly as possible.

              Unassigned Unassigned
              chrisjr_jira Chris Rankin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: