on 06-17-2005 11:19 AM
Hi All,
I have a question about how you build a JCO.Server that could accept multiple concurrent requests...
In the application we are building, the number of requests is likely to be very high and having a JCO.Server that can only accept one call at a time is likely to adversley affect performance.
I can see two ways that you may be able to fix this:
1. Build threading into the handleRequest method - I get the impression from the documentation that this won't work as it indicates that as soon as the handleRequest method completes it returns the results back to SAP.
2. We don't need to do anything - multiple concurrent requests are handled by JCO itself. I can't find any kind of documentation that supports this.
3. We register different instances of the same server against the gateway. This seems the more likely way it wants you to work, however this means there is no way to dynamically scale the application as load increases.
From looking at the underlying C RFC library documentation, it says it fully supports multithreading - so it seems a bit odd that this isn't also covered in the JCO library.
Anyone have any advice on how you can implement what we need with the JCO libraries?
Smith,
Look into 'JCO RFC Provider Service' which helps you acheive this via a Stateless EJB. This way you don't have worry about scalability.
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lee,
in our application we start 3 instances of jco.server and each is registered at the sap gateway. It works good for us. In your case it is very unlikly that there are more than 3 requests at the same time but we could increase the number.
hth
Torsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
create a class 'exampleServer' externed JCO.Server.
//in your main method,create a array of JCO.Server by:
exampleServer serverConnections[] = new exampleServer( i );
//than start your JCO.Server
serverConnections[] .start();
the array length i decide how many server do you create.
Edited by: steiner fisher on May 30, 2008 7:23 AM
Edited by: steiner fisher on May 30, 2008 7:23 AM
Edited by: steiner fisher on May 30, 2008 7:24 AM
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.