[
https://issues.apache.org/jira/browse/WINK-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869184#action_12869184
]
Bryant Luk commented on WINK-284:
---------------------------------
If there's a @Context interface type that isn't resolvable to an actual
concrete context object at the time of injection (or parameter creation), I
believe that a proxy is created in its place. It must be an interface
otherwise the proxy creation doesn't work. Once the proxy is injected, if at a
later time a method is invoked on the proxy, then the proxy will go back to the
messagecontext and try to invoke the method on the real context object then.
I think that covers the case you mentioned. I'll attach a patch that modifies
an existing test case that illustrates what I'm thinking. Maybe I'm
misunderstanding something else.
For your example, there's already a pre-existing LinkBuilders object set on the
context. Therefore, the concrete instance is set in the invocation parameters
(not a proxy). I think only your 3rd code snippet would be required in that
case since you're going to have to modify the parameter.
> User handlers can't add context attributes to get them in resources invocation
> ------------------------------------------------------------------------------
>
> Key: WINK-284
> URL: https://issues.apache.org/jira/browse/WINK-284
> Project: Wink
> Issue Type: Bug
> Components: Server
> Affects Versions: 1.1
> Reporter: David Calavera
> Attachments: deploymentConfiguration.patch, UserHandlersTest.java
>
>
> The creation of the invocation parameters occurs before executing the user
> handlers, so it's not be able to add context attributes to use in the
> resources later.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.