You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nicolas Reeves <ni...@yahoo.com> on 2005/07/23 11:43:09 UTC

Axis Stub Memeory Leak

Hi,
 
I have generated an Axis stub from wsdl2java.  I noticed that there is a memory leak when I invoke the stub a couple of times (Java Heap size constantly growing). I have found similar concerns from other people in the mailing list but I cant find any response that has a definite resolution.  Below is the simple code that I used.
 
 XYZWebServiceServiceLocator locator = new XYZWebServiceServiceLocator();
 XYZWebService service = locator.getXYZws();
              
String serviceAccessId = "xxxx";
String serviceAccessPassword = "yyyy";
String id = "614123456";
int serviceRequest = 1;
String purchaseId = null;
             
 for (int =0; i < 1000; i++ ) {    
     try {
         purchaseId =  service.activate(serviceAccessId, serviceAccessPassword, id, serviceRequest);
     } catch (Exception e) {
         System.out.println(e.getMessage());
     } 
     System.out.println(purchaseId);
 }   
 
Is there any code I need to call to clean up? 
 
Thanks in advance.

		
---------------------------------
 Start your day with Yahoo! - make it your home page