I use XFire as a client. witin Mule,
The XFire Client are in a Pool (common pool) and
many threads are using thoses clients to call a service.
Sometimes (about 14 times / 60) with 2 threads this happens :
DEBUG 2007-02-22 12:57:16,520
[Test-1] org.codehaus.xfire.client.Client:
Received message to
http://serveur:3003/scoperta/scopertaTest
DEBUG 2007-02-22 12:57:16,520
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: adding handler
org.codehaus.xfire.client.CorrelatorHandler@c67a88 to phase pre-dispatch
DEBUG 2007-02-22 12:57:16,520
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: adding handler
org.codehaus.xfire.soap.handler.ReadHeadersHandler@1397e5c to phase parse
DEBUG 2007-02-22 12:57:16,520
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: adding handler
org.codehaus.xfire.soap.handler.ValidateHeadersHandler@196e136 to phase
pre-invoke
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: adding handler
org.codehaus.xfire.handler.LocateBindingHandler@9bad5a to phase dispatch
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: adding handler
org.codehaus.xfire.soap.handler.SoapActionInHandler@91f005 to phase dispatch
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: adding handler
org.codehaus.xfire.soap.handler.SoapBodyHandler@1250ff2 to phase dispatch
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: Invoking phase transport
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: Invoking phase parse
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: Invoking handler
org.codehaus.xfire.soap.handler.ReadHeadersHandler in phase parse
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: Invoking phase pre-dispatch
DEBUG 2007-02-22 12:57:16,521
[Test-1]
org.codehaus.xfire.handler.HandlerPipeline: Invoking handler
org.codehaus.xfire.client.CorrelatorHandler in phase pre-dispatch
DEBUG 2007-02-22 12:57:16,521
[Test-1] org.codehaus.xfire.client.Client:
Correlating context with ID 1172167036476261041791506
INFO 2007-02-22 12:57:16,521
[Test-1] org.codehaus.xfire.client.Client:
No correlated invocation was found.
Cause:
When a client is triggered : Client.onReceive(MessageContext)
It creates a pipeline,
put the handlers in the pipeline then invoke the pipeline *using
MessageContext*
HOWEVER sometimes the client triggered != the client in the context.
so the handlers added to the pipeline are not related to the good client.
Fix:
See patch in attachment
The fix does :
Get the handlers for the client in the MessageContext.
Add them to the pipeline. (not the ones from "this")