Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-4122

Performance Regression in bean resolution in EAR files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.13
    • 8.0.14, 8.0.15
    • TomEE Core Server
    • None

    Description

      This is an interesting regression:

       

      If a component in the webapp part of an EAR-based application performs a lookup programmatically to a CDI bean, and that bean belongs to the EJB part of the EAR application, there is some interesting behaviour:

       

      The InjectionResolver is wrapped by a WebappInjectionResolver. This will attempt to lookup by type in the webapp bean archives. If the bean cannot be resolved here (because it is part of the EJB module), WebappInjectionResolver will then look it up in the parent (which will succeed).

       

      InjectionResolver caches the lookups, but doesn't cache lookup failures (previously it did). The impact is that each time the lookup happens, WebappInjectionResolver will attempt to resolve (and fail) the bean in the webapp archives first, without looking at the cache. 

      This can lead to a significant performance issue, depending on the number of beans in the archives. I have measure it as 1000 TPS vs 60000 TPS.

      Attachments

        Issue Links

          Activity

            People

              jgallimore Jonathan Gallimore
              jgallimore Jonathan Gallimore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: