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 Hongda Lin <hl...@visualanalytics.com> on 2004/03/11 20:32:52 UTC

Is SOAP 2.3 RPC thread safe?

Hi,
	Is SOAP 2.3 RPC thread safe? In another words, do I need to
single thread all the call.invoke()?

Thanks!


Re: Is SOAP 2.3 RPC thread safe?

Posted by Martin Gainty <mg...@hotmail.com>.
Depends on where you place your code
take a look at http://cafeconleche.org/books/xmljava/chapters/ch10s04.html
Specifically:
1)loading new instances of these interfaces inside doPost() rather than
sharing instances created in init(). However, in a potentially high-volume
server environment the resource cost for that feels disturbingly large. A
better alternative would be to manually synchronize access to these objects
inside doPost().
2)You should also steer clear of statics and favor thread local storage
option whenever possible
In other words DONT use variables which appears to be global in scope or are
being initiliased in a non thread-specific manner
Good Question,
Martin
----- Original Message -----
From: "Hongda Lin" <hl...@visualanalytics.com>
To: <so...@ws.apache.org>
Sent: Thursday, March 11, 2004 2:32 PM
Subject: Is SOAP 2.3 RPC thread safe?


Hi,
Is SOAP 2.3 RPC thread safe? In another words, do I need to
single thread all the call.invoke()?

Thanks!


Re: Is SOAP 2.3 RPC thread safe?

Posted by Scott Nichol <sn...@scottnichol.com>.
Your client code is responsible for serializing access to an instance of Call.  For multithreaded clients, this is typically accomplished by having a Call instance for each thread.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Hongda Lin" <hl...@visualanalytics.com>
To: <so...@ws.apache.org>
Sent: Thursday, March 11, 2004 2:32 PM
Subject: Is SOAP 2.3 RPC thread safe?


Hi,
Is SOAP 2.3 RPC thread safe? In another words, do I need to
single thread all the call.invoke()?

Thanks!