Weblogic Web服务客户端.(纯净引用)

Weblogic Web服务客户端.(纯净引用)

问题描述:

我创建了一个端口池(Web服务客户端),因为在每个请求上即时创建客户端都会导致

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

现在,我注意到Web服务客户端保留了对请求和响应的引用...

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

那正常吗??

不幸的是,对于此网络服务而言,有效负载非常大,即使没有使用一段时间,池中仍保留了对一些不再使用的响应的引用...增加了堆..

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 ?

更新:使用Apache CXF客户端我没有这个问题,但是pb.仍对Weblogic客户端开放..

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

@Cris:尽管我没有在weblogic Web服务上进行广泛的工作,但上述问题还是很奇怪.您可以尝试以下方法: 您已在链接列表中合并了端口...将对Web服务的调用提交给单独的线程,并在线程完成(Web服务的调用完成)后,必须对所有线程本地对象进行垃圾回收.您需要Java Profiler的帮助才能确定谁在Web服务调用后保留了引用.如果使用Dispatch接口,则可以通过BindingProvider接口打印出请求上下文和响应上下文Map对象以了解更多信息.

@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..