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

Use BeanManager#resolve instead of iteration in SEArtifactFactory

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0.Final
    • Fix Version/s: 1.1.0.Final
    • Component/s: jberet-se
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                cfang Cheng Fang
                Reporter:
                cfang Cheng Fang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: