axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Joseph <>
Subject Re: AXIS2 - Application Service Scope Questions
Date Thu, 03 Apr 2008 00:12:00 GMT
Tbanks Deepal for your informative response.  Now I feel confident on 
how to write my 'application' scoped web service (ie, taking care to be 

Deepal jayasinghe wrote:
> Jonathan Joseph wrote:
>> I have a couple of questions regarding Axis2 web services configured 
>> to run with service scope set to 'Application':
>> 1) Is the web service a singleton?
> yes
>> 2) Is the web service thread-safe?
> yes and no
>> I think that the answers are 1) Yes, 2) No. I couldn't find an 
>> explicit answer in the Axis2 documentation.
> Once you deploy a service in application scope we create only one 
> instance of the service implementation class. And we store the 
> instance in the ServiceContext. So each and every request coming to 
> that service uses the same service instance. However in web service 
> world we have to write our services in a stateless manner , meaning 
> write the class so that we do not store any class level variable in 
> the service impl class. Then the service invocation would become 
> thread safe as well.
> Thank you!
> Deepal
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message