[weld-dev] cdi extension - unique bean name

Jozef Hartinger jharting at redhat.com
Thu Jul 23 03:59:51 EDT 2015


Hi Emily,

is the bean supposed to see all the flows in all the wars in the ear? 
Won't this then break isolation of web apps (e.g. war1 seeing flow 
defined in war2)?

Jozef

On 22.7.2015 10:19, Emily Jiang wrote:
> continued:
> The issue is that when it comes to do the validation, Weld insists all
> bean names must be unique among all the beans which this extension can
> see. This extension does not need to use el. What is the point to do the
> upfront validation? Is it possible to switch off this unique bean name
> validation for some bdas or only throw an exception when it cannot
> resolve el successfully?
>
> On Wed, Jul 22, 2015 at 9:14 AM, Emily Jiang <emijiang6 at googlemail.com
> <mailto:emijiang6 at googlemail.com>> wrote:
>
>     Hi Jozef,
>
>     The extension I am referred to is jsf extension,
>     FlowBuilderCDIExtension, which registers the bean
>     FlowBuilderFactoryBean. This FlowBuilderFactoryBean tries to get all
>     instances of Flows:
>     @Inject
>          @Any
>          private Instance<Flow> flowDefinitions;
>
>     On Wed, Jul 22, 2015 at 8:08 AM, Jozef Hartinger
>     <jharting at redhat.com <mailto:jharting at redhat.com>> wrote:
>
>         Hi Emily,
>
>         can you elaborate a bit more how your extension looks like? If
>         the bean registered by an extension is really shared across wars
>         there should be no ambiguous resolutions.
>
>         Jozef
>
>
>         On 21.7.2015 22:35, Emily Jiang wrote:
>
>
>             I have a question on the CDI extension. I would like to
>             define an
>             extension which is shared among the modules such as multiple
>             war modules
>             and be able to access all war modules. However, I got the
>             following
>             error WELD-001414: Bean name is ambiguous. Name echo
>             resolves to beans:
>             as there are same bean names in multiple wars. Is it
>             possible to switch
>             off the unique bean name checks for some extensions? Do you
>             have any
>             suggestions on how to resolve the problem.
>             --
>             Thanks
>             Emily
>             =================
>             Emily Jiang
>             ejiang at apache.org <mailto:ejiang at apache.org>
>             <mailto:ejiang at apache.org <mailto:ejiang at apache.org>>
>
>
>             _______________________________________________
>             weld-dev mailing list
>             weld-dev at lists.jboss.org <mailto:weld-dev at lists.jboss.org>
>             https://lists.jboss.org/mailman/listinfo/weld-dev
>
>
>
>
>     --
>     Thanks
>     Emily
>     =================
>     Emily Jiang
>     ejiang at apache.org <mailto:ejiang at apache.org>
>
>
>
>
> --
> Thanks
> Emily
> =================
> Emily Jiang
> ejiang at apache.org <mailto:ejiang at apache.org>


More information about the weld-dev mailing list