[weld-issues] [JBoss JIRA] Commented: (WELD-905) @Alternative broken if multiple implementations are in the classpath

Gerhard Petracek (JIRA) jira-events at lists.jboss.org
Mon May 23 06:28:01 EDT 2011


    [ https://issues.jboss.org/browse/WELD-905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603647#comment-12603647 ] 

Gerhard Petracek commented on WELD-905:
---------------------------------------

2 bean archives. in archive one is an impl. + an alternative (the alternative is activated in the beans.xml). in the 2nd bda is a class which extends the impl. of the first jar (but it's annotated with @Typed()) -> due to this 2nd @Typed() impl. the alternative impl. of the first jar stops working (if you remove the 2nd jar it works again - no changes in the first jar).
maybe again a glassfish 3.1 issue which might work in glassfish 3.2

> @Alternative broken if multiple implementations are in the classpath
> --------------------------------------------------------------------
>
>                 Key: WELD-905
>                 URL: https://issues.jboss.org/browse/WELD-905
>             Project: Weld
>          Issue Type: Bug
>          Components: Resolution (Typesafe and by Name)
>    Affects Versions: 1.1.1.Final
>            Reporter: Gerhard Petracek
>            Priority: Critical
>
> example (broken):
> bean-archive #1:
>  - BeanA
>  - BeanA1 (@Alternative)
>  - beans.xml (activates BeanA1 as alternative)
> bean-archive #2:
>  - BeanA2 (@Typed())
>  - beans.xml (empty)
> BeanA1 doesn't get used (without an error or a warning BeanA is used instead - even though BeanA1 is activated as alternative in the same bean-archive)
> example (working):
> bean-archive #1:
>  - BeanA
>  - BeanA1 (@Alternative)
>  - beans.xml (activates BeanA1 as alternative)
> jar #2 (no bean-archive):
>  - BeanA2 (@Typed())
> BeanA1 gets activated as alternative (as expected) because jar #2 isn't a bean-archive (that's the difference compared to the broken example).
> that prevents >e.g.< portable extensions from providing extension-points to work around the broken @Alternative spec. section.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list