It sounds like you need "application" scope for your Web Service, which means Axis 
will create only one instance of your class to service all requests. Check the docs 
for how to set this up in your WSDD file.

In addition, you might need to introduce some synchronisation in that class to prevent 
it executing two requests concurrently.

Hope this helps
Keith


-----Original Message-----
From: Mayur Shetye [mailto:[EMAIL PROTECTED]
Sent: 21 September 2004 23:35
To: [EMAIL PROTECTED]
Subject: Shared resource


hi

   I having a serverside program which accesses a
shared resource, a UNIX command which shouldnt be
invoked again till it has returned. this command is
going to be called by a Java program which shall be an
implementation of a webservice (server end). Given the
asynchronous nature of service calls I have some
queries .

1. Are webservices multithreaded by default ? OR is a
new instance created everytime the webservce is
invoked by the client. If it is a thread then I might
be able to use locks .

2. IF it is not multithreaded, how do I restrict these
programs (processes) accessing my command. Is using a
static varible in the code and changing the staus the
only way to do this ?

Thanks in advance
Mayur Shetye


                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Reply via email to