Weblogic webservice clients.(clean references)

2019-06-23 08:48发布

问题:

I created a pool of ports (webservice clients) because creating on the fly on each request the client lead to a bottleneck

Now I noticed that the webservice clients hold references to the request and response...

Is that normal... ?

Unfortunately the payload is quite big for this websevice and like this even if not used for a while the pool holds references to some not anymore used responses...increasing heap ..

Is there a way to clean those references after receiving the response ?

Update: using Apache CXF clients i do not have this problem however pb. is still open for weblogic clients..

回答1:

@Cris: though I have not worked extensivly on weblogic web service but above issue is quite strange. You may try this: you have pooled ports in linked list...submit invocation of a webservice call to a separate thread and once thread completes(webservice call complete), all thread local objects must be garbage collected. You need help of java profiler to find out who is holding references post webservice call..if you are using Dispatch interface, you may print out request context and response context Map objects through BindingProvider interface to find out more..