Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1330

EJB timer service should use a thread pool to avoid OOM

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Out of Date
    • Affects Version/s: AS 4.2.2.GA, AS 5.0.0.Beta4
    • Fix Version/s: None
    • Component/s: timerservice-mk2
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use org.jboss.ejb3.StrictMaxPool instead of org.jboss.ejb3.ThreadlocalPool.
      This will limit the total number of instances in the VM is limited to the maximum
      pool size and the OOM will not occur.

      Show
      Use org.jboss.ejb3.StrictMaxPool instead of org.jboss.ejb3.ThreadlocalPool. This will limit the total number of instances in the VM is limited to the maximum pool size and the OOM will not occur.
    • Estimated Difficulty:
      Medium

      Description

      The default EJB timer service used by the EJB3 layer is based on
      org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory which delegates
      to the standard org.jboss.ejb.txtimer.EJBTimerService.

      For EJB3 beans using the EJB timer service the thread local pool should not be used.
      Since the current EJB timer service creates a new thread for each timer being created, the
      thread local pool will create a matching instance of the bean for that thread. Thus the number
      of active instances in total can effectively grow unchecked and thus an OOM will occur.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wolfc Carlo de Wolf
              Reporter:
              galder.zamarreno Galder ZamarreƱo
              Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: