AnsweredAssumed Answered

OutOfMemory when invoking web services

Question asked by jos.snellings on Apr 15, 2008
When one departs from the canonical code examples in the SDK samples, one is tempted to use constructs like:


Let us say, a method in a class performs operations on the repository using Alfresco's web services, containing the above construct.
However, after performing operations on volatile repositoryService and contentService instances, an OutOfMemoryError occurs.

Question: who has observed this behaviour?

The problem is alleviated when the repositoryService and contentService are private members that are set once:

public class SoapBoxThatDoesNotGetBlownUp
private RepositoryServiceSoapBindingStub repositoryService;   
private ContentServiceSoapBindingStub contentService;

public SoapBoxThatDoesNotGetBlownUp()
   repositoryService = WebServiceFactory.getRepositoryService();
   contentService      = WebServiceFactory.getContentService();

               { other initialisation stuff }

Did somebody found the cause of this memory leakage?
(ok that last question may be a bit academic, I hope the hint will be of practical use)