[ 
https://jira.jboss.org/browse/CDITCK-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12547599#action_12547599
 ] 

Pete Muir commented on CDITCK-137:
----------------------------------

I've re-read the spec, in order to try to construct a clear picture.

From 6.5.3

"The container must ensure that every injection point of type InjectionPoint 
and qualifier @Default of any dependent object instantiated during this process 
receives:
     •  an instance of InjectionPoint representing the injection point into 
which the dependent object will be injected, or 
     •  a null value if it is not being injected into any injection point."
 
From this, it is clear that for the injection point under discussion, whether 
it is null, or a valid InjectionPoint object depends upon:

a) that the decorator it is injected into is a "dependent object", and that
b) that the decorator is being "injected into an injection point"

Given that 8.1 says "A decorator is a managed bean." and that the decorator is 
dependent scoped, (a) is clearly true.

I can find no direct statement to say that (b) is true, otoh, I can find no 
direct statement to say it is false. Therefore, we have to fall back to 
secondary evidence.

1) Given the overall design philosophy injection points, it seems reasonable, 
and useful, to have them work inside decorators
2) It is reasonable to assume that the decorators and injection points should 
work in a consistent fashion - either decorators should be visible to injection 
points (and thus be able to inject injection points, and use them) or be 
invisible (and thus have no effect on injection points, such that they behave 
as though the decorators aren't present)
3) Given the existence of the InjectionPoint.isDelegate() method, the spec 
clearly intends you to be able to identify that the bean is being injected into 
a decorator's delegate injection point. If we were to assume that decorators 
are "invisible" to injection points (so that the injection point for the 
decorated bean is in fact the client), then this method would always return 
false, and thus be pointless.

> org.jboss.jsr299.tck.tests.decorators.invocation.testChainedDecoratorInvocation.DecoratorInvocationTest
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CDITCK-137
>                 URL: https://jira.jboss.org/browse/CDITCK-137
>             Project: CDI TCK
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Gurkan Erdogdu
>
> Method : testChainedDecoratorInvocation
> In this test, TCK tests the injection points of the Decortor delegate. But it 
> seems that this test is specific to Weld. In our case, we manage decorator 
> stack via single delegate not via injection each decorator reference to 
> DecoratorInvocationTest

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

_______________________________________________
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to