[jboss-user] [JBoss Web Services CXF] - XTS tests broken in AS trunk after switch to CXF stack in 3.3.0
Andrew Dinn
do-not-reply at jboss.com
Thu Jun 10 10:53:08 EDT 2010
Andrew Dinn [http://community.jboss.org/people/adinn] replied to the discussion
"XTS tests broken in AS trunk after switch to CXF stack in 3.3.0"
To view the discussion, visit: http://community.jboss.org/message/547396#547396
--------------------------------------------------------------
> Alessio Soldano wrote:
>
> Andrew, thanks for the great analysis. In few words, it seems to me that what your tests reveal is that the threadlocal solution for getting the jbossws-spi endpoint in the jbossws custom invoker cannot work in the asynch dispatch happening in usecases like yours.
>
yes, that pretty much sums it up.
> Alessio Soldano wrote:
>
> I'm thinking of an alternative solution; it should be possible to use the Exchange associated to a given message as the mean for shipping the endpoint instance to the invoker. I'm thinking of using a custom ServletDestination for adding the endpoint to the exchange after it's been created. I'll try this later today or early tomorrow morning, then I'll most probably need you to help again with testing the solution.Thanks for now
A simpler solution might be to store the current endpoint in the runnable created in ContextUtils.rebaseResponse and then restore it when processing continues i.e.
> final Endpoint ep = EndpointAssociation,.getEndpoint()
>
>
> // pause dispatch on current thread ...
> inMessage.getInterceptorChain().pause();
>
>
> // ... and resume on executor thread
> getExecutor(inMessage).execute(new Runnable() {
> Endpoint savedEp = ep;
> public void run() {
> EndpointAssociation.setEndpoint(savedEp);
> inMessage.getInterceptorChain().resume();
> }
> });
>
Of course this also means that EndpointAssociation can be changed to use a conventional ThreadLocal rather than an InheritedThreadLocal to hold the association.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/547396#547396]
Start a new discussion in JBoss Web Services CXF at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2046]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100610/730f3d8a/attachment.html
More information about the jboss-user
mailing list