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 Jochen Rieß <jo...@uni-dortmund.de> on 2007/08/18 18:52:24 UTC

When is 'public void destroy(ServiceContext serviceContext) {...}' called?

Hello again,

I got a little question concerning the method public void 
destroy(ServiceContext serviceContext) inside a service-class.

- When I have my service scope set to "request" - Is it right that this 
Method will never be called? I expected it to be called whatever scope 
is set.. Is it advisable to let my service implementation call this 
method on their own?

This 'feature' really gave me a headache today, If anybody knows why it 
behaves like that I would really like to hear from you.

Thanks,
Jochen

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


Re: When is 'public void destroy(ServiceContext serviceContext) {...}' called?

Posted by Deepal jayasinghe <de...@gmail.com>.
Hi Jochen
> Hello again,
>
> I got a little question concerning the method public void
> destroy(ServiceContext serviceContext) inside a service-class.
>
> - When I have my service scope set to "request" - Is it right that
> this Method will never be called? I expected it to be called whatever
> scope is set.. Is it advisable to let my service implementation call
> this method on their own?
Well , Axis2 does not call destroy method when you deploy a service in
request scope by design.
In the meantime , when we deploy a service in request scope , we really
do not need to do any session management stuff. So I think it is ok not
to call the method.

Thanks
Deepal

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