All incoming clients requests are handled by your underlying web server with concurrent threads from a thread pool. When you indicate application or request scope for your web service hosted in an axis server, it's axis engine's job to decide whether to instantiate a new service layer object to serve the request.
-----Original Message----- From: Xinjun Chen [mailto:[EMAIL PROTECTED] Sent: Monday, July 24, 2006 11:16 AM To: [email protected] Subject: Re: web services multithreading Hi Christopher, Thank you very much for the detailed answers! :-) I have one more follow on question: Assume the service scope is set as "application", if there are multiple clients invoke the same operation. How will this be done? According to the meaning of "application" scope, then no multithreading is support. This really confused me. How to make web services scalable? Regards, Xinjun On 7/23/06, Christopher Sahnwaldt <[EMAIL PROTECTED]> wrote: > The answers all depend on the 'scope' that you set in your services > configuration. See http://ws.apache.org/axis/java/user-guide.html > > > 1. At the runtime, if there are multiple clients invoke the > OperationA > > > concurrently, how it will be done internally? > > Your application server (Tomcat etc.) will use one thread for each request. > If scope is 'request', each request will be executed on a different > service object. If scope is 'application', all requests will be > executed on the same service object. > > > 2. I think there will be only one instance of ServiceA, right? > > If scope is 'request', a new object is created for each request. > If scope is 'application', the same object is re-used for all requests. > > > 3. Will there be one extra thread created when one invocation happens? > > The thread probably won't be created (it will come from a pool), but > that depends on your application server, not on Axis. The app server > will handle concurrent requests in concurrent threads. > > > 4. If the same client invokes the OperationA in two consecutive > > call, it is ensured that the first call will always be served before > > the second call? > > Short answer: Yes. Long answer: Yes, as long as the client uses HTTP > (or another synchronous protocol) and does not make the calls in > different threads. > > > 5. Is there any difference about this multiple invocations in Axis2? > I don't understand the question... > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
