cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to execute RFC concurrently

Former Member
0 Kudos

Hello

I'm developping a client application in JAVA using JCO 3. The purpose of the application is to gather information from different AS using RFC.

My problem is that i can't manage to execute RFC concurrently. The JCO API seems to execute the RFC's sequencially, even if they are executed from different threads and toward different destinations.

If one of the AS is shut down, the execution of RFC towards it will hold all others until the connection timeout expires.

I want to be able to execute RFC against responding and not responding servers, without the ones interfering with the others.

To make sure that the problem is not induced by my code, i reproduced it simply by modifying the well known example :

MultiThreadedExample.java

Simply change the code to run jobs on two destinations alternatively. One that is responding, and that is not.

A simplier example would be to get 2 JCoDestination instances, one responding and one not responding.

Then run "destination.ping()" in 2 different threads. The ping of the responding destination will return only after the ping of the other one times out.

I can't beleive that the JCO client is not able to handle concurrent connections, What am i missing here ?

Thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I just saw your remark here. The description you're giving sounds strange. We run a lot of concurrent calls and they are really executed concurrently. And we're having indeed several destinations. I'm not experiencing any serialization for those calls. With which JCo version have you tried? Have you managed to use the failing destination before at all? Perhaps try out the latest JCo release from https://service.sap.com/connectors - > SAP Java Connector -> Tools & Services, and verify that it's not an issue because of the old version.

Regards,

Markus

Former Member
0 Kudos

I can't beleive tha the JCO is not able to start 2 different calls in 2 different threads in parallel.

If your call were statefull, I would say that you have to implement a SessionReferenceProvider. It AFAIK, the .ping is not statefull... Don't know if you need a SessionReference even if the call is stateless....

May be someone can confirm...

Regis