Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-2662

WebServiceContext injection into WS Provider leads to memory leaks

XMLWordPrintable

      JBoss AS going out of memory after a few hrs of mild load (~100 request/minute) having the following code

      @WebServiceProvider(serviceName = "SampleService", portName = "SamplePort", wsdlLocation = "WEB-INF/wsdl/sample.wsdl")
      @BindingType(value = HTTPBinding.HTTP_BINDING)
      @ServiceMode(value = Service.Mode.PAYLOAD)
      public class SampleProvider extends AbstractServiceProvider implements Provider<Source> {

      @Resource(type = Object.class)
      protected WebServiceContext wsContext;

      public Source invoke(Source req)

      { MessageContext mc = wsContext.getMessageContext(); String path = ((String) mc.get(MessageContext.PATH_INFO)).substring(1); JAXBSource result; // // whatever // return result; }

      }

      As I mentioned in referenced forum thread, if I set wsContext to null after use, memory leak goes away.

              rhn-support-asoldano Alessio Soldano
              sintetik7_jira Sergey Graschenko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: