Skip to Content

Multithreaded Server Architecture with JCo for Outbound Calls?

Hi together,

i wrote a small server which connects our R/3 (4.6C) with a BS2000 Mainframe. I used SAPJCo 2.1.3. The application works fine but i don't feel comfortable with creating a fixed number of server threads for handling multiple outbound calls. I am not keen on writing own load balancing routines.

Does anybody know if it is possible to program a JCo server that dynamically starts new threads for serving calls from the R/3 system?

Regards & Thanks for reply,


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jan 12, 2005 at 03:24 PM

    This is not possible from the API as far as I know.

    A possible workaround if you expect a really high load of requests or long running function calls would be to start a new server thread each time a function call is requested and to stop that server thread when the original function call returns. In other words each server thread generates a child thread upon being called from R/3 and sends a stop request to the child when the call is returning. All you need is to add synchronized stop() and isStopped() methods to the server thread class. The stop() method of JCO.Server should be overridden such that it can stop only if no function call is handled.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.