Thanks Daniel for your reply

My testing enviroment was

Java: version 1.6.0_24, vendor Sun Microsystems Inc.
-XX:MaxPermSize=128m
-Xmx1024m
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=true

Tomcat 6.0.23 + Apache CXF 2.7.8 + WS Addressing enabled


>Can you capture both the request and the response?
>Can you double check that the returns “RelatesTo” header has the appropriate 
>msg id?

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
<soap:Header>
<Action xmlns="http://www.w3.org/2005/08/addressing";>process</Action>
<MessageID 
xmlns="http://www.w3.org/2005/08/addressing";>urn:uuid:8e51d90c-1013-48c6-bd74-b41751f3e0a7
</MessageID>
<To xmlns="http://www.w3.org/2005/08/addressing";>http://extermal.com/Process.jpd
</To>
<ReplyTo xmlns="http://www.w3.org/2005/08/addressing";>
<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
</ReplyTo>
</soap:Header>
<soap:Body>
<process xmlns="urn:com:external:types">
<phone>3460003344</phone>
</process>
</soap:Body>
</soap:Envelope>


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<SOAP-ENV:Envelope xmlns:add="http://schemas.xmlsoap.org/ws/2004/08/addressing";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
<SOAP-ENV:Header>
<add:MessageID>urn:uuid:8e51d90c-1013-48c6-bd74-b41751f3e0a7</add:MessageID>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns:processResponse
xmlns:ns="urn:com:external:types">
<ns:resultCode>0</ns:resultCode>
<ns:ldata>
<ns:ldata2>
<ns:data>
<ns:id>1237</ns:id>
</ns:data>
</ns:ldata2>
</ns:ldata>
</ns:processResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I  don't see any “RelatesTo” header in response. Should it ?

> If you turn on logging, is there any warning about not being able to 
> correlate the response?


2014-01-13 12:58:38.779 [http-8080-2] WARN  [ContextUtils] [doLog] -
WS-Addressing - failed to retrieve Message Addressing Properties from
context
2014-01-13 12:58:38.780 [http-8080-2] WARN  [ContextUtils] [doLog] -
WS-Addressing - failed to retrieve Message Addressing Properties from
context
2014-01-13 12:58:39.799 [http-8080-2] WARN  [ContextUtils] [doLog] -
WS-Addressing - failed to retrieve Message Addressing Properties from
context


>Can you use jvisualvm or similar to grab a heap dump and trace down to the 
>appropriate place that is holding onto the strings?

Well  , I'm not an expert about JVM analyzing .
I did a heap dump when heap memory was in its higher value and I
executed "Find the 20 biggest objects *by retained size*" and I got

org.apache.cxf.endpoint.ClientImpl#1   50.703.981
org.apache.cxf.ws.addressing.soap.MAPCodec#1  50.691.121
java.util.concurrent.ConcurrentHashMap#108 50.691.026
java.util.concurrent.ConcurrentHashMap$Segment[]#108 50.690.986
....


If I look at references , I see :

- there are *a lot of * HashMap$Entry objects referencing to
ClientImpl object ( on its 'value' field )
Indeed, The percentage of HashMap$Entry instance's occurrences  is the
higher value in this heapdump


I tried to create a new JAX-WS proxy client per request and heap
memory behaviour is right.
( I was using a jaxws:client bean, a singleton , I guess )

So, looks like that jaxws proxy clients with WS-Addressing enabled
retain some info about request/response and , if the response doesn't
match what it is waiting, it doesn't clean that info  , is this right
?

So far, writing thread-safe code isn't enough : I must to
create/destroy a proxy client per request


Regards

Reply via email to