Please try with a Nighly build. As I think this could be the problem.

in Stub class we have this at the clean up method.

protected void finalize() throws Throwable {
        super.finalize();
        cleanup();
    }

   public void cleanup() throws AxisFault {
        _service.getAxisConfiguration().removeService(_service.getName());
    }

this removes the service from the Axisconfiguration but does not remove the
end points.

If we take the ServiceClient clean up method. it calls to
axisConfiguration.removeServiceGroup(serviceGroupName);

this method looks like this,

Iterator services = axisServiceGroup.getServices();
        while (services.hasNext()) {
            AxisService axisService = (AxisService) services.next();
            allServices.remove(axisService.getName());
            if (!axisService.isClientSide()) {
                notifyObservers(AxisEvent.SERVICE_REMOVE, axisService);
            }

            //removes the endpoints to this service
            String serviceName = axisService.getName();
            String key = null;
            for (Iterator iter =
axisService.getEndpoints().keySet().iterator(); iter.hasNext();){
                key = serviceName + "." + (String)iter.next();
                this.allEndpoints.remove(key);
            }

        }

As you can see here Now the service is not available and as a result of that
endpoints are not removed.

I removed the service removal code from the Stub and as a result of that I
did see the memory leak with was there earlier.

Axis2 trunk has this change already.

thanks,
Amila.



On Tue, Oct 7, 2008 at 7:35 AM, Mel T <[EMAIL PROTECTED]> wrote:

>
>
>
> >> I have the same problem as described here.
> >> Upgrading to 1.4.1 has reduced the leak.
> >> I am now going to try the pool of stubs as well for the remaining.
> >>
> >> Dave, is your client running in Tomcat ?
> >> My problem only occurs when I am accessing the WS using a stub from
> >> within
> >> the same tomcat application.
> >
> > Yes, my client is running in Tomcat, Tomcat 5.5.27 to be exact. I
> > wonder if that is somehow also contributing to the issue?
> >
> > -Dave
> >
>
> I believe this is an issue with that setup. Not easy to debug. I will post
> here if I find something.
>
> --
> View this message in context:
> http://www.nabble.com/When-do-cleanup-functions-need-to-be-called--tp18724207p19849777.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to