Hi, I was reviewing the best practices documentation regarding the OrganizationServiceProxy class. In the section Improve service channel allocation performance, it states:
"Notice that the returned service reference is not thread safe so multi-threaded applications will need to allocate one instance per thread."
Our application is a web API endpoint with multiple concurrent callers. The code provided by our CRM developer uses a singleton OrganizationServiceProxy that all requests use without coordination. If it is not thread safe, what kind of problems could we run into? I suspect the problems may not manifest themselves until there is enough load.
What is the typical approach for handling multiple concurrent requests? Create a object pool of OrganizationServiceProxy objects?
*This post is locked for comments