wuwuxin 28 Posted October 31, 2021 For a Web Service application, I would like to create ONE global instance of HTTPRIO, then access it from different threads to invoke remote methods (of the same Web Service server). Is this safe, or any potential issues? Share this post Link to post
Dalija Prasnikar 1396 Posted November 1, 2021 It is not thread safe. You cannot share one instance among threads. 1 Share this post Link to post
wuwuxin 28 Posted November 1, 2021 4 hours ago, Dalija Prasnikar said: It is not thread safe. You cannot share one instance among threads. Thank you Dalija. Would it be OK to set the properties (e.g., WSDL URL) of HTTPRIO first, then share it among multiple threads? These threads won't change it properties, just use it to access the Web Service. Share this post Link to post
Dalija Prasnikar 1396 Posted November 1, 2021 54 minutes ago, wuwuxin said: Thank you Dalija. Would it be OK to set the properties (e.g., WSDL URL) of HTTPRIO first, then share it among multiple threads? These threads won't change it properties, just use it to access the Web Service. No. When you use it, even if you don't change the properties, there are other state (encapsulated data) changes happening and this is where multiple threads can interfere with each other. 1 Share this post Link to post