Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2593

SimpleServiceRegistry can be leaking services on BeanDeployment creation

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 3.1.1.Final, 3.0.6.Final
    • Fix Version/s: None
    • Labels:
      None

      Description

      org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry currently holds a map and a set. The set is in fact a subset of map's values - it contains bootstrap services.
      Now, org.jboss.weld.bootstrap.BeanDeployment object creation entails copying of services which is done based on map keys. This works fine unless the set contains duplicate classes twice (which is the case with WFLY-12330),

      Solution is to remove this set and only operate on the map.
      Along with that we should also modify WeldStartup.endInitialization() to contain following one-liner that will force clean all the instances:

      beanDeployment.getBeanDeploymentArchive().getServices().cleanupAfterBoot();
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  manovotn Matěj Novotný
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: