Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-357

WebbeansFinder should index first on ClassLoader, not singleton type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • M4
    • 1.0.0-alpha-1
    • None
    • None
    • tiered classloader

    Description

      I'm finding WebbeansFinder a little difficult to work with since it is unable to easily clear all instances a / the current classloader.

      I would like to change the map to have the primary index on the classloader from:

      private static Map<String, Map<ClassLoader, Object>> singletonMap = new HashMap<String, Map<ClassLoader, Object>>();
      to
      private static Map<ClassLoader, Map<String, Object>> singletonMap = new HashMap<ClassLoader, Map<String, Object>>();

      Currently, this only really breaks removeInstance(String name) which AFAICT has no callers. This would be replaced by e.g.

      clearInstance(ClassLoader cl)

      And most current callers of clearInstances() would I think prefer to just clear an individual classloader.

      Opinions welcome, and curious if anyone wants to preserve a removeInstance(String name) method.

      Attachments

        Activity

          People

            gerdogdu Gurkan Erdogdu
            covener Eric Covener
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified