[
https://issues.apache.org/jira/browse/CXF-8348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226358#comment-17226358
]
Freeman Yue Fang commented on CXF-8348:
---------------------------------------
Hi [~junhuhdev],
IMO storing in the cxf exchange object is the most straightforward way to do it.
The interceptor itself should be stateless, if you have any stateful data which
life is just for a invocation, then the cxf exchange is the place to store.
Best Regards
Freeman
> Question about sharing thread-safe data between interceptor
> -----------------------------------------------------------
>
> Key: CXF-8348
> URL: https://issues.apache.org/jira/browse/CXF-8348
> Project: CXF
> Issue Type: Bug
> Reporter: Jun
> Priority: Major
>
> Hello,
> I have a scenario where I need to store a session token that can only be used
> once for next subsequent soap request.
> I am having a bit of trouble implementing this.
> My initial approach was to create an inbound- and outbound interceptor.
> In the inbound interceptor I store the session token if available so that the
> outbound interceptor can use it.
> But I'm not sure how to pass the data between interceptors and also guarantee
> thread-safety.
> (1) Should I store in the exchange object?
> (2) Should I implement some custom FIFO queue to handle this?
> (3) Should I use MDC context to store it?
> Any feedback would be greatly appreciated.
> // Jun
--
This message was sent by Atlassian Jira
(v8.3.4#803005)