axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Will Briggs <wrbri...@gmail.com>
Subject Re: is ServiceClient thread-safe?
Date Thu, 22 May 2008 23:35:07 GMT
Is it critical to share it amongst several threads, or are you just 
looking to minimize the number of clients you instantiate?  Last I 
heard, ServiceClient was not thread-safe.  However, you can implement a 
Singleton pattern using ThreadLocal so that everything running within 
the same thread can share the service client.  This is pretty effective 
if you only have a few threads, but doesn't save you much if you have many.

-Will

Alexis Midon wrote:
> Hi all,
>
> I'd like to know if I can share one ServiceClient instance among 
> several threads.
>
> Thanks,
>
> Alexis


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message