ProgrammaticBeanLookup doesn't regard alternatives

Description

When referencing a CDI-bean in BPMN-XML the CdiResolver uses the getValue() method which makes a call to the ProgrammaticBeanLookup.lookup(String, BeanManager).
In the lookup method the BeanManager is asked for beans which match a certain name. The BeanManager delivers all beans, that match the name.
When registering an alternativ in the beans.xml and annotating both beans with the same name (@Named(...)) the BeanManager finds at least two beans that match.
The first bean found is taken.
That ways it can happen, that not the alternativ, as expected, is taken but the normal bean.

See http://forums.activiti.org/en/viewtopic.php?f=6&t=5968&sid=02c62743be40c006b65aa873181a1d86

Environment

Weld 2.0.0 Alpha 2
Arquillian Weld EE embedded 1.1
JUnit 4

Assignee

Frederik Heremans

Reporter

Ronny Br_unlich

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure