[JBoss JIRA] (CDI-304) Clarify Producers for injection into generic types
by Mark Struberg (JIRA)
[ https://issues.jboss.org/browse/CDI-304?page=com.atlassian.jira.plugin.sy... ]
Mark Struberg edited comment on CDI-304 at 2/12/13 3:09 AM:
------------------------------------------------------------
sounds like a good solution. But we should also check what happens if there are ambiguous situations. E.g. if you have multiple Producer methods which map to different generic types of the same base type. In other words we might need to enhance the BeanManager#getBeans() or #resolve(), isn't?
was (Author: struberg):
sounds like a good solution. But we should also check what happens if there are ambiguous situations. E.g. if you have multiple Producer methods which map. In other words we might need to enhance the BeanManager#resolve(), isn't?
> Clarify Producers for injection into generic types
> --------------------------------------------------
>
> Key: CDI-304
> URL: https://issues.jboss.org/browse/CDI-304
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans
> Affects Versions: 1.1.PRD
> Reporter: Mark Struberg
> Fix For: 1.1 (Proposed)
>
>
> There is a discussion over in DeltaSpike whether an injection point
> {code}
> @Inject
> private JsfMessage<SomeMessageClass>;
> {code}
> with a producer method
> {code}
> @Produces @Dependent
> JsfMessage createMessage(InjectionPoint ip)
> {code}
> 5.2 imo only defines the other way around. Having a raw type at the injection point and a parameterized producer method.
> We should define how this is intended to work.
> Please note that the producer above works in all existing containers so far but not in Weld2-beta1.
> Here is the link to the DS issue: https://issues.apache.org/jira/browse/DELTASPIKE-295
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (CDI-304) Clarify Producers for injection into generic types
by Mark Struberg (JIRA)
[ https://issues.jboss.org/browse/CDI-304?page=com.atlassian.jira.plugin.sy... ]
Mark Struberg commented on CDI-304:
-----------------------------------
sounds like a good solution. But we should also check what happens if there are ambiguous situations. E.g. if you have multiple Producer methods which map. In other words we might need to enhance the BeanManager#resolve(), isn't?
> Clarify Producers for injection into generic types
> --------------------------------------------------
>
> Key: CDI-304
> URL: https://issues.jboss.org/browse/CDI-304
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans
> Affects Versions: 1.1.PRD
> Reporter: Mark Struberg
> Fix For: 1.1 (Proposed)
>
>
> There is a discussion over in DeltaSpike whether an injection point
> {code}
> @Inject
> private JsfMessage<SomeMessageClass>;
> {code}
> with a producer method
> {code}
> @Produces @Dependent
> JsfMessage createMessage(InjectionPoint ip)
> {code}
> 5.2 imo only defines the other way around. Having a raw type at the injection point and a parameterized producer method.
> We should define how this is intended to work.
> Please note that the producer above works in all existing containers so far but not in Weld2-beta1.
> Here is the link to the DS issue: https://issues.apache.org/jira/browse/DELTASPIKE-295
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (CDI-304) Clarify Producers for injection into generic types
by Martin Kouba (JIRA)
[ https://issues.jboss.org/browse/CDI-304?page=com.atlassian.jira.plugin.sy... ]
Martin Kouba commented on CDI-304:
----------------------------------
I can't but agree..
> Clarify Producers for injection into generic types
> --------------------------------------------------
>
> Key: CDI-304
> URL: https://issues.jboss.org/browse/CDI-304
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans
> Affects Versions: 1.1.PRD
> Reporter: Mark Struberg
> Fix For: 1.1 (Proposed)
>
>
> There is a discussion over in DeltaSpike whether an injection point
> {code}
> @Inject
> private JsfMessage<SomeMessageClass>;
> {code}
> with a producer method
> {code}
> @Produces @Dependent
> JsfMessage createMessage(InjectionPoint ip)
> {code}
> 5.2 imo only defines the other way around. Having a raw type at the injection point and a parameterized producer method.
> We should define how this is intended to work.
> Please note that the producer above works in all existing containers so far but not in Weld2-beta1.
> Here is the link to the DS issue: https://issues.apache.org/jira/browse/DELTASPIKE-295
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (CDI-304) Clarify Producers for injection into generic types
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-304?page=com.atlassian.jira.plugin.sy... ]
Pete Muir commented on CDI-304:
-------------------------------
Per JLS 5.1.9 "Use of an unchecked conversion generates a mandatory compile-time warning" (this is a unchecked conversion), therefore, I think CDI should do just the same. It should work, but generate a warning. WDYT?
> Clarify Producers for injection into generic types
> --------------------------------------------------
>
> Key: CDI-304
> URL: https://issues.jboss.org/browse/CDI-304
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans
> Affects Versions: 1.1.PRD
> Reporter: Mark Struberg
> Fix For: 1.1 (Proposed)
>
>
> There is a discussion over in DeltaSpike whether an injection point
> {code}
> @Inject
> private JsfMessage<SomeMessageClass>;
> {code}
> with a producer method
> {code}
> @Produces @Dependent
> JsfMessage createMessage(InjectionPoint ip)
> {code}
> 5.2 imo only defines the other way around. Having a raw type at the injection point and a parameterized producer method.
> We should define how this is intended to work.
> Please note that the producer above works in all existing containers so far but not in Weld2-beta1.
> Here is the link to the DS issue: https://issues.apache.org/jira/browse/DELTASPIKE-295
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] (CDI-304) Clarify Producers for injection into generic types
by Pete Muir (JIRA)
[ https://issues.jboss.org/browse/CDI-304?page=com.atlassian.jira.plugin.sy... ]
Pete Muir commented on CDI-304:
-------------------------------
This should be pretty easy to decide on, we just do the same as the assignability in Java itself.
> Clarify Producers for injection into generic types
> --------------------------------------------------
>
> Key: CDI-304
> URL: https://issues.jboss.org/browse/CDI-304
> Project: CDI Specification Issues
> Issue Type: Clarification
> Components: Beans
> Affects Versions: 1.1.PRD
> Reporter: Mark Struberg
> Fix For: 1.1 (Proposed)
>
>
> There is a discussion over in DeltaSpike whether an injection point
> {code}
> @Inject
> private JsfMessage<SomeMessageClass>;
> {code}
> with a producer method
> {code}
> @Produces @Dependent
> JsfMessage createMessage(InjectionPoint ip)
> {code}
> 5.2 imo only defines the other way around. Having a raw type at the injection point and a parameterized producer method.
> We should define how this is intended to work.
> Please note that the producer above works in all existing containers so far but not in Weld2-beta1.
> Here is the link to the DS issue: https://issues.apache.org/jira/browse/DELTASPIKE-295
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months