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 Gul Onural <on...@nortel.com> on 2007/05/30 06:40:00 UTC
init and destroy functions in an application scope axis2 service
I see init and destroy functions implemented in one of the samples
(servicelifecycle) in Axis2 distro.
public void init(ServiceContext serviceContext)
public void destroy(ServiceContext serviceContext) throws AxisFault
When are these functions get invoked for a service that is deployed as
"application" scope service?
What happens if an "application" scope service doesn't implement those
functions?
Gul
Re: init and destroy functions in an application scope axis2 service
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Gul
>
> I see init and destroy functions implemented in one of the samples
> (servicelifecycle) in Axis2 distro.
>
> public void init(ServiceContext serviceContext)
> public void destroy(ServiceContext serviceContext) throws AxisFault
>
> *When are these functions get invoked for a service that is deployed
> as "application" scope service?*
Servicelifecycle has nothing to do with the service scope , the life
cycle will help you to manage the lifetime of a your service
(description) , not the contexts.
Service lifecycle will help you to do something like open a DB
connection when you deploy the service and to close that when system
shutdown.
> *What happens if an "application" scope service doesn't implement
> those functions?*
Nothing will happen.
> **
> Gul
--
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org