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]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to