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

SimpleServiceRegistry can be leaking services on BeanDeployment creation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 3.1.1.Final, 3.0.6.Final
    • None

      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();
      

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

                Created:
                Updated:
                Resolved: