axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rodrigo Ruiz (JIRA)" <>
Subject [jira] Commented: (AXIS-2505) memory leak in wsdl generation
Date Tue, 24 Apr 2007 12:34:15 GMT


Rodrigo Ruiz commented on AXIS-2505:

Fairly simple :-)

However, looking deeper into this class I have found that:

- namespaceMappings is private, and it does not have a getter
- Across the class, only the first item is ever accessed

It seems that in the current trunk, the list is just a holder for the default namespace, and
the rest of the list is unused. Maybe we could just simplify this :-D

> memory leak in wsdl generation
> ------------------------------
>                 Key: AXIS-2505
>                 URL:
>             Project: Axis
>          Issue Type: Bug
>          Components: WSDL processing
>    Affects 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
> 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.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message