[
https://issues.apache.org/jira/browse/OWB-714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13543012#comment-13543012
]
Arne Limburg commented on OWB-714:
----------------------------------
Mark, it is an issue.
5.5 says "The container must provide a bean with scope @Dependent, bean type
InjectionPoint and qualifier @Default, allowing
dependent objects, as defined in Section 6.4.1, “Dependent objects”, to obtain
information about the injection point to
which they belong. The built-in implementation must be a passivation capable
dependency, as defined in Section 6.6.2,
“Passivation capable dependencies”."
Though the spec does not really say which injection point you get. In
https://issues.jboss.org/browse/CDI-271 I propose a better integration for
Instances...
But for now, the only injection point that makes sense is the InjectionPoint of
the Instance and a user can expect to get it when he wants to get it injected
into a dependent bean.
> EmptyStackException when accessing an instance that is created by a producer
> method that has an InjectionPoint as parameter.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: OWB-714
> URL: https://issues.apache.org/jira/browse/OWB-714
> Project: OpenWebBeans
> Issue Type: Bug
> Reporter: Arne Limburg
> Assignee: Arne Limburg
>
> EmptyStackException when accessing an Instance that is created by a producer
> method that has an InjectionPoint as parameter.
> The following code leads to the exception:
> public class MyProducingBean {
> @Produces
> public MyProducedBean produceBean(InjectionPoint ip) {
> ...
> }
> }
> public class MyUsingBean {
> @Inject
> private Instance<MyProducedBean> beanInstance;
> public void someMethod() {
> beanInstance.get(); // throws EmptyStackException
> }
> }
--
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