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 Mel T <ma...@gmail.com> on 2008/10/07 02:27:14 UTC

Re: When do cleanup functions need to be called?


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.

--
Mel T.
-- 
View this message in context: http://www.nabble.com/When-do-cleanup-functions-need-to-be-called--tp18724207p19848906.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: When do cleanup functions need to be called?

Posted by Mel T <ma...@gmail.com>.


Amila Suriarachchi wrote:
> 
> Please try with a Nighly build. As I think this could be the problem.
> ...
> -- 
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
> 

Any idea when an release with this fix is planned ? Would this be in  1.4.2
?

-- 
View this message in context: http://www.nabble.com/When-do-cleanup-functions-need-to-be-called--tp18724207p20749331.html
Sent from the Axis - User mailing list archive at Nabble.com.


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


Re: When do cleanup functions need to be called?

Posted by Amila Suriarachchi <am...@gmail.com>.
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 <ma...@gmail.com> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


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

Re: When do cleanup functions need to be called?

Posted by Mel T <ma...@gmail.com>.


>> 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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: When do cleanup functions need to be called?

Posted by David Rees <dr...@gmail.com>.
On Mon, Oct 6, 2008 at 5:27 PM, Mel T <ma...@gmail.com> 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

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