Hi,
I find strange that memory usage grows. Could you provide a short code snippet
how you invoke the client?
As a solution: in most of cases the client proxies are thread safe and can be
reused for concurrent calls - it can improve performance and memory in your
case.
If you are applying request specific settings in
((BindingProvider)proxy).getRequestContext(), it is possible to activate thread
local context:
((BindingProvider)proxy).getRequestContext().put("thread.local.request.context",
"true");
Take a look into
http://cxf.apache.org/faq.html#FAQ-AreJAX-WSclientproxiesthreadsafe? For the
further details.
Regards,
Andrei.
> -----Original Message-----
> From: John D. Ament [mailto:[email protected]]
> Sent: Dienstag, 18. Dezember 2018 05:31
> To: [email protected]
> Subject: Memory usage while working with SOAP Client Proxies
>
> I'm using CXF 3.2.7 to communicate with SOAP services. I generate client
> stubs
> using wsdl2java. My applicates run on Kubernetes and we use pretty small
> deployments. We recently saw that at times we run out of metaspace and can
> see higher memory usage after a few invocations of the soap client.
>
> Based on JAX-WS recommendations, I use the service as a per request model,
> and throw away the service when the request is done; no concurrency.
> However based on my findings it seems like new classes are being defined with
> each invocation. Is there a way to tell CXF to reuse the class definition
> instead
> of creating a new one per invocation?
>
> Thanks,
>
> John
As a recipient of an email from Talend, your contact personal data will be on
our systems. Please see our contacts privacy notice at Talend, Inc.
<https://www.talend.com/contacts-privacy-policy/>