Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-159

Use BeanManager#resolve instead of iteration in SEArtifactFactory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.0.Final
    • 1.0.0.Final
    • jberet-se
    • None

    Description

      org.jberet.se.SEArtifactFactory#getBean currently iterates thru the results of beanManager.getBeans(ref), and returns the first element (there should be only 1 element in the results).

      We should use javax.enterprise.inject.spi.BeanManager#resolve instead.

      resolve method basically does:

      • if beans is null or empty, return null;
      • if only 1 element, return it;
      • if more than 1 element, throw ambiguous deps exception.

      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: