Hi Patrick,

I think u have used the wrong word, as in *local varibales*. Since ur
Web Service does not maintain state, it is not appropriate to contain
*instance variables* (not local variables).

The following was quoted from the Axis user guide,

"Axis supports scoping service objects (the actual Java objects which
implement your methods) three ways. "Request" scope, the default, will
create a new object each time a SOAP request comes in for your
service. "Application" scope will create a singleton shared object to
service all requests. "Session" scope will create a new object for
each session-enabled client who accesses your service. To specify the
scope option, you add a <parameter> to your service like this (where
"value" is request, session, or application):"

According to ur requirements, the best is to go for *request* or
*application* scope (sessions scope is not required since there is no
requirement to manage state across method calls for a particular
user). I think it is better to go for application scope since u have
performance in mind as well. If u have request scope, then a new
instance of the web service object will be created to serve each
request (each method call) -- this will be a overhead IMO

Mahen


 


On Wed, 8 Sep 2004 18:02:55 +0200, Patrick Herber <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I'm implementing my first Web Service and I have a question regarding the
> "scope" of the Web Service and its influence on the performance: my Web
> Service won't have any state (local variables), will only perform read
> operations (therefore I don't have any locking problem) and is going to be
> use by many concurrent users.
> 
> Which is the suitable scope for such a service?
> Where can I find a "guide" about the scope of the Web Service (when to use
> which)? I've tried to google for it, but without success (perhaps I've used
> a bad query...)
> 
> Thanks a lot for your support.
> 
> Patrick
> 
> Patrick Herber
> Zürich (Switzerland)
> 
>

Reply via email to