Skip to Content
avatar image
Former Member

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


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?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 29, 2018 at 11:35 PM


    Did you try Parallelization using Asynchronous RFC (aRFC) ?

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


    Add comment
    10|10000 characters needed characters exceeded

  • Mar 14, 2018 at 11:19 AM

    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,


    Add comment
    10|10000 characters needed 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.