Integrity Java API implementation not thread-safe
Hi all together!
I'm a bit wondering for some time and today thought about something which would improve the performance of one of our integrations (communicating with Integrity using the Java API), if this wouldn't be the case. There're notes in the Java Doc of the Integrity Java API (mksapi.jar), like this:
"Note: The MKS implementation of this interface is not thread safe and it is not recommended that multiple threads be used to access this interface."
(From the com.mks.api.response.Response interface)
So, the problem is, if I want to reliable access the methods of a PTC/MKS implementation of the Response interface (which is the usual thing returned by CmdRunner.executeCommand(), I need to build my whole application as a single-threaded, sequenciel application. This is, at least from performance point of view, not the best idea in all cases. Consider this case:
We've an integration which periodically requests information from Integrity and performs tasks based on the results of a query (actually it's a "test client", which executes test cases and reports back the test result). The idea would be to execute the tests in a pool of some threads instead of in a sequenciel order (like it is implemented now), and also report back the test results in an asynchronus task, once the execution of a test case finished. However, this is not possible, as the MKS api is marked as being not thread-safe for most interfaces.
The question now is: Does anyone know, why? And, does anyone know, if this will change in the (near) future?
Thanks for any reply!
Best,
Florian

