0 Replies Latest reply on Oct 8, 2007 8:57 AM by m0hmad

    Client side memory leak?

    m0hmad

      Hello,

      I've got EJBs that operates in proxy mode. They just pass thru requests parameters to JBossWS Client implementation and redirect responses back.
      All WS artifacts, service and endpoints have been generated with wsconsume tool. Soap endpoints are exposed like:

      public class SoapServicesFactory {
      
       static private Content contentSoap; // the SOAP client
      
       static public synchronized ContentSoap getContentSoap() {
       if (null == contentSoap)
       contentSoap = new Content();
       return contentSoap.getContentSoap();
       }
      }

      The endpoint released right after first remote method invoked, no storing or caching etc being performed.

      The problem is, ALL artifacts retrieved from WSs as responses will never released by Garbage Collector and sooner or later there Java heap Space criticall error will be.
      Utilizing profiler I can see that artifacts retained by instances of several classes:
      - org.jboss.ws.core.soap.ObjectContent
      - org.jboss.ws.coreEndpointInvocation
      - java.lang.Object

      Changing endpoint exposing to:
      return (new MobileContent()).getMobileContentSoap();

      removes the memory leakage but the service works too slowly cos instantiation of Soap Service is too expensive procedure.

      Can anybody help me with this issue?

      Looking forward for any response.
      Thanks in advance.