Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1065

Ambiguous name validation should not cross visibility boundaries

    Details

      Description

      Caused by "additionalBeanDeploymentArchive" in the AS7 integration code that makes every two deployed beans transitively visible.

        Gliffy Diagrams

          Issue Links

            Activity

            jharting Jozef Hartinger created issue -
            jharting Jozef Hartinger made changes -
            Field Original Value New Value
            Link This issue is related to WELD-1042 [ WELD-1042 ]
            jharting Jozef Hartinger made changes -
            Link This issue relates to CDI-188 [ CDI-188 ]
            Hide
            fcorneli Frank Cornelis added a comment -

            Simple Arquillian based integration test that demonstrates the issue.

            Show
            fcorneli Frank Cornelis added a comment - Simple Arquillian based integration test that demonstrates the issue.
            fcorneli Frank Cornelis made changes -
            Attachment multiple-wars-test.patch [ 12352489 ]
            alesj Ales Justin made changes -
            Fix Version/s 1.2.0.Beta1 [ 12319290 ]
            Fix Version/s 1.1.6.Final [ 12318492 ]
            sbs-jira-plugin Jive JIRA Integration made changes -
            ceefour Hendy Irawan made changes -
            Link This issue relates to WELD-1 [ WELD-1 ]
            ceefour Hendy Irawan made changes -
            Link This issue is a dependency of SOLDER-311 [ SOLDER-311 ]
            jharting Jozef Hartinger made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Fix Version/s 1.2.0.Beta1 [ 12319290 ]
            Resolution Done [ 1 ]
            Hide
            fcorneli Frank Cornelis added a comment -

            Did some additional tests. It's not only the @Named that gives ambiguous errors, but also simple @Produces methods that produce objects of the same type.

            Show
            fcorneli Frank Cornelis added a comment - Did some additional tests. It's not only the @Named that gives ambiguous errors, but also simple @Produces methods that produce objects of the same type.
            Hide
            lucaster Luca Cavagnoli added a comment -

            How come this issue is marked as fixed in version 2.0.0.Alpha3? I've just tried the attached test case on jboss-as-7.1.1.Final-weld-2.0.0.Alpha3, and deployment still fails with the message:

            WELD-001414 Bean name is ambiguous. Name myBean resolves to beans [Managed Bean [class org.jboss.tools.examples.test.MyBean] with qualifiers [@Default @Any @Named], Managed Bean [class org.jboss.tools.examples.test.MyBean] with qualifiers [@Default @Any @Named]]

            Show
            lucaster Luca Cavagnoli added a comment - How come this issue is marked as fixed in version 2.0.0.Alpha3? I've just tried the attached test case on jboss-as-7.1.1.Final-weld-2.0.0.Alpha3, and deployment still fails with the message: WELD-001414 Bean name is ambiguous. Name myBean resolves to beans [Managed Bean [class org.jboss.tools.examples.test.MyBean] with qualifiers [@Default @Any @Named] , Managed Bean [class org.jboss.tools.examples.test.MyBean] with qualifiers [@Default @Any @Named] ]
            Hide
            jharting Jozef Hartinger added a comment -

            The testcase is not valid. It is not portable to have multiple classes of the same name within the deployment. Weld currently does not support this but it's being done as part of WELD-1259. The valid testcase is at https://github.com/weld/core/blob/2.0/tests-arquillian/src/test/java/org/jboss/weld/tests/enterprise/validation/MultiwarProjectNameValidationTest.java

            Show
            jharting Jozef Hartinger added a comment - The testcase is not valid. It is not portable to have multiple classes of the same name within the deployment. Weld currently does not support this but it's being done as part of WELD-1259 . The valid testcase is at https://github.com/weld/core/blob/2.0/tests-arquillian/src/test/java/org/jboss/weld/tests/enterprise/validation/MultiwarProjectNameValidationTest.java
            velias Vlastimil Eliáš made changes -
            Workflow jira [ 12483201 ] GIT Pull Request workflow [ 12548063 ]
            jharting Jozef Hartinger made changes -
            Link This issue Cloned to WELD-1584 [ WELD-1584 ]

              People

              • Assignee:
                jharting Jozef Hartinger
                Reporter:
                jharting Jozef Hartinger
              • Votes:
                5 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development