Skip to Content
-1

Multiple registration of the same rfc destination from hosts leads to deadlocks and inconsistencies

Mar 14 at 10:55 AM

53

avatar image
Former Member

Hello,

my problem is as follows: we have a registered RFC Destination as a "Registered server program". The destination is registered with TCP/IP connection from type T.

In the program we register the server RFC Destination and create a function repository with the help of Jco.

JCoServer server = JCoServerFactory.getServer(serverName);

JCoCustomRepository repo = JCo.createCustomRepository(serverName);

Everything works fine as long as there is just one instance of our program running. However, when we have multiple instances, then the server gets created and initiated for each program instance. This, in its turn, leads to multiple entries in the Gateway monitor table (smgw). Once this happens, the requests to the rfc servers are redirected sporadically and deadlocks occur.

What is the best way to solve this problem? We cannot register a different rfc destination for each program instance? Is there a way in which we can use just one server and prevent the registration and initiation of the other servers for each program instance?

Regards!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

ROBERTO Forti Santos Mar 29 at 11:35 PM
-1

Hi,

Did you try Parallelization using Asynchronous RFC (aRFC) ?

The STARTING NEW TASK addition enables you to start a function module asynchronously on another system.

Regards,

Share
10 |10000 characters needed characters left characters exceeded
Antal Perger
Mar 14 at 11:19 AM
0

Hi Ina,

When you create a JCo server with more threads, each JCo server process registers the same program ID on the ABAP gateway, it is the expected behaviour, see the JCo documentation, ServerDataProvider:

jco.server.progid - The program ID for registering and identifying the JCoServer at the gateway

jco.server.connection_count - The number of server connections to register at the gateway

Where do you get a deadlock?

Best regards,

Antal

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Antal,

the problem is that we essentially create a new server for each program instance. And all servers have the same RFC-Destination name and programID. When we set the number of connections to more than 1, through serverProperties.put(ServerDataProvider.JCO_CONNECTION_COUNT, "10"), then only one of the created servers gets all the RFC calls as long a it has a sufficient amount of connection slots free. In the example above, it is 10.

And we kind of wanted to have each server receive its own rfc calls. But as long as they all share the same programID, this cannot happen. That is why I was wondering if there is some kind of a workaround which we can use and which does not involve the creation of multiple rfc destination with different programIDs. Because we can have unconstrained amount of program instances.

Regards,

Ina

0