[
https://issues.apache.org/jira/browse/EXTCDI-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13012158#comment-13012158
]
Gerhard Petracek edited comment on EXTCDI-162 at 4/9/11 10:24 AM:
------------------------------------------------------------------
imo users don't directly think - i create a custom project-stage - ah right
everything is a bean and codi has a producer for the project stage - i've to
use @Typed - ask 100 users - and maybe 1 will think that way. the "problem" is
- as soon as you create a custom implementation and you forget it - you get the
exception (just because we have an >internal< producer which already uses the
default qualifier).
@a: it is - because it's easier for users and you need @Typed() in all cases -
you never have the choice to do something different
@b: we already have an observer in an extension -> the overhead would be only
one method call (and not a whole extension)
@c: no - because they can use @Typed() if they are aware of it (without
breaking something)
@Veto or @NoBean or maybe even better @Ignored would be fine for me as well -
esp. @Ignored would be more expressive than @Typed()
imo @Ignored would be a nice feature anyway. we already had this topic in an
irc discussion
was (Author: gpetracek):
imo users don't directly think - i create a custom project-stage - ah right
everything is a bean and codi has a producer for the project stage - i've to
use @Typed - ask 100 users - and maybe 1 will think that way. the "problem" is
- as soon as you create a custom implementation and you forget it - you get the
exception (just because we have an >internal< producer which already uses the
default qualifier).
@a: it is - because it's easier for users and you need @Typed() in all cases -
you never have the choice to do something different
@b: we already have an observer in an extension -> the overhead would be only
one method call (and not a whole extension)
@c: no - because they can use @Typed() if they are aware of it (without
breaking something)
@Veto or @NoBean or maybe even better @Ignored would be find for me as well -
esp. @Ignored would be more expressive than @Typed()
imo @Ignored would be a nice feature anyway. we already had this topic in an
irc discussion
> re-visit implementation of custom project stages.
> -------------------------------------------------
>
> Key: EXTCDI-162
> URL: https://issues.apache.org/jira/browse/EXTCDI-162
> Project: MyFaces CODI
> Issue Type: Task
> Components: Core
> Affects Versions: 0.9.4
> Reporter: Gerhard Petracek
>
> if users forget @Typed(), they would see an AmbiguousResolutionException.
> cdi-qualifiers aren't supported (in case of project-stages). so @Typed() is
> required all the time.
> currently valid example:
> public class CustomProjectStage implements ProjectStageHolder
> {
> @Typed()
> public static final class Debugging extends ProjectStage
> {
> private static final long serialVersionUID = -8626602281649294170L;
> }
> public static final Debugging Debugging = new Debugging();
> }
> since there is no support for cdi-qualifiers, we could veto those classes.
> that would allow to skip the @Typed() but the rest would be the same (because
> codi will still find them).
> pro: users don't have to use @Typed() explicitly (and they won't see the
> AmbiguousResolutionException, if they forget using @Typed())
> con: it isn't std. cdi - but adding @Typed() even though it isn't needed
> wouldn't harm.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira