|
I connection pool my service clients, because they also have minor
memory leak issues - i.e. they don't seem to get completely garbage
collected - (I discovered this after heavy duty performance testing of
them - haven't drilled it down further to work out what is the issue
with them though). When a call to the web service is made, I grab the service client out of the connection pool or lazily instantiate it as is necessary, re-jig its security outflow configuration depending on the user who made the call, then put it back in the pool after the call is finished (in a finally block). Will Briggs wrote: I just had to go through re-writing my singleton connection class to use ThreadLocal (quick and relatively painless, but a learning experience nonetheless)... Maybe someone else on the list has a better suggestion, but this seems to be the easiest way I've found of being able to use a pseudo-singleton pattern with ServiceClient. Like I said, with a lot of threads, you still end up with a lot of connections, but at least for me, sharing within the thread is a much bigger gain than worrying about sharing between threads. -- Anthony ------------------------------------- Anthony Bull Senior Developer Black Coffee Software Ltd PO Box 10-192 The Terrace Wellington, New Zealand [EMAIL PROTECTED] Ph +64 4 472 8818 Fax +64 4 472 8811 ------------------------------------- www.bcsoft.co.nz --------------------------------------------------------------- This email may contain confidential or privileged information, and is intended for use only by the addressee, or addressees. If you are not the intended recipient please advise the sender immediately and do not copy, use or disclose the contents to any other person or organisation. Black Coffee Software Ltd accepts no responsibility for viruses received with this email, or to any changes made to the original content. Any views or opinions expressed in this email may be personal to the sender and are not necessarily those of Black Coffee Software Ltd. --------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] |
- is ServiceClient thread-safe? Alexis Midon
- Re: is ServiceClient thread-safe? Will Briggs
- Re: is ServiceClient thread-safe? Alexis Midon
- Re: is ServiceClient thread-safe? Will Briggs
- Re: is ServiceClient thread-safe? Anthony Bull
- Re: is ServiceClient thread-safe? Michele Mazzucco
- Re: is ServiceClient thread-safe? Alexis Midon
- Re: is ServiceClient thread-safe? sultanat
- Re: is ServiceClient thread-safe? Alexis Midon
