axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Sahnwaldt (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-2505) memory leak in wsdl generation
Date Mon, 19 Jun 2006 18:52:29 GMT
memory leak in wsdl generation
------------------------------

         Key: AXIS-2505
         URL: http://issues.apache.org/jira/browse/AXIS-2505
     Project: Apache Axis
        Type: Bug

  Components: WSDL processing  
    Versions: current (nightly)    
    Reporter: Christopher Sahnwaldt
    Priority: Minor


There's a memory leak in org.apache.axis.description.JavaServiceDesc.setDefaultNamespace():

the method adds the given namespace to an ArrayList. This method is called from 
org.apache.axis.wsdl.fromJava.Emitter.init(), which in turn is called from 
org.apache.axis.providers.BasicProvider.generateWSDL() each time wsdl is generated for a service,

i.e. whenever .../ServiceName?wsdl is invoked.

To reproduce start an Axis server in a debugger, invoke ...?wsdl from a browser a couple of
times for 
a certain service, and check the instance variable namespaceMappings in the JavaServiceDesc
for that service. It grows by one element each time the wsdl is generated.

A simple (if not very elegant) fix would be to simply remove the namespace before adding it
to the list again. If it's not present, nothing happens; if it is, it's moved to the first
slot:

public void setDefaultNamespace(String namespace) {
    if (namespaceMappings == null)
        namespaceMappings = new ArrayList();
    namespaceMappings.remove(namespace);
    namespaceMappings.add(0, namespace);
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message