On Wed, Jul 30, 2008 at 2:15 PM, David Rees <[EMAIL PROTECTED]> wrote:

> On Tue, Jul 29, 2008 at 10:52 PM, Amila Suriarachchi
> <[EMAIL PROTECTED]> wrote:
> > this method should be call when the MyServiceStub (see finalize method in
> > ServiceClient) is garbage collected. I am not sure why it is not being
> > called automatically.
>
> I don't think that it's being garbage collected at all. From what I
> can tell, a bunch of objects are still being referenced by the
> AxisConfiguration referenced by the AxisServlet.


well see this code,

public static void clientCall1() {
 MyServiceStub stub = new MyServiceStub("http://example.com/myservice";);
 ClientCall1 req = new ClientCall1();
 ClientCall1Response res = stub.clientCall1(req);
 // Need to call this when calling using this function in a web service
 // Otherwise huge resource leak occurs
 stub._getServiceClient().cleanup();
 }
}

After this method call this class should be garbage collected. since stub
does not have any reference after that.






>
>
> > In RC1 we fixed a memory leak regarding this. But I can not realy think
> the
> > reason for your problem.
>
> Yes, 1.4.1 RC1 makes the situation a lot better than 1.4 - Calling
> cleanup has no effect on the memory leak (see my earlier followup
> email).
>
> > you can get the AxisConfiguration object like this,
> > AxisConfiguration axiConfiguration =
> >
> MessageContext.getCurrentMessageContext().getConfigurationContext().getAxisConfiguration();
> >
> > and check whether there are some additional objects there after calling
> > clean up.
> >
> > Please log a jira.
>
> Once I can create a small reproducable test-case I'll log a jira issue.


yep. this helps a lot.

thanks,
Amila.

>
>
> Let me know if there is any other information I can gather or if
> there's anything else you want me to try in the meantime.
>
> Thanks,
>
> -Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Amila Suriarachchi,
WSO2 Inc.

Reply via email to