on 04-01-2014 5:13 PM
I am currently in the process of migrating a C++ application from using Classic RFC to NW RFC. I have a multi-threading question from Note 513386 and Using Multi Threading - Components of SAP Communication Technology - SAP Library (both about JCo but look relevant) it seems that you cannot execute (call RfcInvoke) for multiple concurrent functions on the same connection. Does this apply just to RfcInvoke or all calls related to a Function (eg, RfcCreateFunction, RfcDestroyFunction, ...).
Thanks,
Simon
It turns out that the problem was actually with RfcPing, this was being used to check if a connection was still open before re-using it. By replacing this with RfcIsConnectionHandleValid the issue disappears and while its not guaranteed that the connection is still open, its better than nothing with the added bonus of being less expensive than RfcPing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Simon,
As per information in SAP note 513386
The recommended procedure for multithreaded applications is, however, not to share any JCO.Client instances via several threads at all, but rather to use an individual instance for each thread.The JCo client pooling mechanism offers a special service here, as you can use it to fetch a client from the pool as required, use it for your function call and then return it to the pool.Multithreading and synchronization problems do not then even arise
This has impact on Rfcinvoke process only. Once the RFC connection is invoked, we can execute relevant function modules and then release the connection.
Hope this helps.
Regards,
Deepak Kori
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.