Thanks but IMO this is quite complex for such a normal requirement.
Is there any chance to discuss this with the expert group?
Maybe we could implement in OWB after a successful discussion.


2013/10/29 Mark Struberg <[email protected]>

> you could create a CDI Extension which does the
> ProcessAnnotatedType.veto().
>
> You could also try to use DeltaSpike globalAlternatives for it. This
> should do pretty much what you like and internally also works with veto().
>
> LieGrue,
> strub
>
>
>
>
> >________________________________
> > From: Thomas Andraschko <[email protected]>
> >To: [email protected]; Mark Struberg <[email protected]>
> >Sent: Tuesday, 29 October 2013, 21:43
> >Subject: Re: Alternative + Named
> >
> >
> >
> >Hi Mark,
> >
> >is there any change to get similar behavior?
> >It's actually a must-have for product development.
> >We would like to have multiple implementations in our core and just
> active them via alternative.
> >With @Specialized or @Exclude, i can't do it without code changes :/
> >
> >
> >
> >
> >
> >
> >2013/10/29 Mark Struberg <[email protected]>
> >
> >Gee, I fear this is not really well specified.
> >>I'd rather not bet for it to work.
> >>Honestly I would have expected that an AmbiguousResolutionException gets
> thrown.
> >>
> >>I'd use @Exclude or @Specializes in this case.
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >>
> >>
> >>
> >>----- Original Message -----
> >>> From: Thomas Andraschko <[email protected]>
> >>> To: [email protected]
> >>> Cc:
> >>> Sent: Tuesday, 29 October 2013, 21:23
> >>> Subject: Alternative + Named
> >>>
> >>> Hi,
> >>>
> >>> should it actually be possible to overwrite a bean with a alternative
> named
> >>> bean?
> >>>
> >>> e.g ->
> >>>
> >>> @Named public class A
> >>>
> >>> with a activated
> >>>
> >>> @Named("a") @Alternative public class A extends B
> >>>
> >>>
> >>> This somehow just works randomly. Every X container startup, the right
> bean
> >>> will be used with EL.
> >>>
> >>> Thanks.
> >>>
> >>> Regards,
> >>> Thomas
> >>>
> >>
> >
> >
> >
>

Reply via email to