Issue Type: Bug Bug
Affects Versions: 2.1.2.Final
Assignee: Matus Abaffy
Components: Class Beans (Managed and Session)
Created: 16/Jan/14 8:00 AM
Description:

Two session beans:

  • same name
  • implementing the same local interface (Animal) and declaring no other views
  • deployed in two different modules, one module (A) is visible to the other (B).

When trying to inject Animal in the module B, once I get an instance of the first bean, next time an instance of the second one. The correct behavior would be DeploymentException due to ambiguous dependency.

interface Animal {}
@Stateful(name = "Animal")
public class Cat implements Animal {}
@Stateful(name = "Animal")
public class Dog implements Animal {}
public class Bar {
    @Inject
    private Animal animal;
}

Deployment structure:
EAR

  • ejb.jar: Animal, Dog
  • test.war: Bar, Cat
Project: Weld
Priority: Major Major
Reporter: Matus Abaffy
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira