[
https://issues.apache.org/jira/browse/WINK-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12869506#action_12869506
]
David Calavera commented on WINK-284:
-------------------------------------
I'll try to explain how I see the execution chain now, perhaps I'm missing
something:
1. The wink handlers are executed and set attributes in the message context
2. The method parameters array is created loading entities, attributes...
from the message context
3. The users handlers are executed, and here:
- if I want to override one of the default wink attributes,
like the LinkBuilders, I need to hack the searchResult. (PERHAPS IS JUST A
CORNER CASE)
- I can add attributes to the context, with setAttribute, but
they won't be ever in the parameters array, because the array was already
created, so I need to get the messageContext in my resource and use the method
getAttribute
4. The resource method is executed
How I'd like to handlers chain will be executed:
1. The wink handlers are executed and set attributes in the message context
2 . The users handlers are executed, and here:
- I can easily overload already loaded attributes or load new
ones, with setAttribute
3. The method parameters array is created loading entities, attributes...
from the message context. The signature on my resource method can contain
@Context FooInterface fooAttribute where fooAttribute is an attribute injected
in the context in the users handler execution chain.
4. The resource method is executed
> 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.