This is not to say for the entire JCo infrastructure that it will be thread safe or not. It depends on the classes and instances used.
JCoFunction data container instances, such as JCoFunction , JCoTable , JCoStructure and JCoRecord , are not thread safe - fortunately, because they are usually not available from different streams at the same time, therefore not automatically synchronizing these instances leads to increased performance.
But classes and static methods are thread safe in JCo. For example, you do not need to synchronize calls with the JCoDestinationManager .
And with JCoDestination this is a special case. Usually you do not need to synchronize your calls with this instance, because it will internally create and use different RFC client connection objects for each session. In the default JCo implementation, each thread is treated as a separate session, so you cannot run into thread safety issues here. Only if the infrastructure environment registers its own SessionReferenceProvider during SessionReferenceProvider execution and at the same time assigns the same session identifier to multiple threads, then there can be conflicts with the security threads for RFC calls with state preservation at the same destination. In this case, JCo detects this error situation and throws a JCoException with the error group JCO_ERROR_CONCURRENT_CALL .
Trixx source share