Community

XTS tests broken in AS trunk after switch to CXF stack in 3.3.0

reply from Alessio Soldano in JBoss Web Services CXF - View the full discussion

Andrew Dinn wrote:

 

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.

Yes, this would be simpler, but ContextUtils lives in Apache CXF which of course cannot use JBossWS stuff directly. Hence the need for adding the Endpoint reference while we're still in jbossws code, so that we can later find it in the invoker once CXF returns control to JBossWS (in a different thread)

I'll see what we can do in any case :)

Reply to this message by going to Community

Start a new discussion in JBoss Web Services CXF at Community