Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15401

Simplify NonFunctionalTimerService and exclude it from TimerServiceRegistry

    XMLWordPrintable

Details

    Description

      currently there are 3 groups of NonFunctionalTimerService:

      • when timer service is disabled;
      • when a stateless, mdb, or singleton bean does not have timeout method;
      • for stateful bean, which is not allowed to have timer service

      the above 3 kinds of NonFunctionalTimerService only differ in their message. We should be able to make NonFunctionalTimerService instances immutable and shareable by all occasions to reduce memory consumption.

      all instances of NonFunctionalTimerService are registered with TimerServiceRegistry, along with good TimerService, which slows down getting timers. For example, if an app contains a stateless bean with timers, 2 stateless bean without timers, and 3 stateful bean, the TimerServiceRegistry will contain 5 instances of NonFunctionalTimerService, and 1 instance of good TimerService. getAllTimers() operation will loop through all 6 instances in a synchronized block while 5 of them are not contributing to the result.

      Attachments

        Activity

          People

            cfang@redhat.com Cheng Fang
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: