You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Wenbiao Han <we...@ulticom.com> on 2001/08/28 15:10:53 UTC

How to share a variable of a service class among different clients' requests?

 Hi:

 Suppose a member variable x of a Java service class X has a HashTable type,
I am wondering how the different clients can add or delete entries in the
variable x? Can I set the scope of the service class as "application" and
synchronize the adding/deleting mehods when the client
wants to add/delete the HashTable entries?

 As I understand, only one instance of a service class is created if
"application" scope is set. The question is whether the same variable
instance X.x can be accessed by different clients?

 Thanks in advance for your answers

Kelvin