cancel
Showing results for 
Search instead for 
Did you mean: 

JCO Server Multithreading

Former Member
0 Kudos

Hi,

I need to develop a JCO Server that should handle multiple requests and then I need to start multiple instances of the listeners.

I would like a sample code for it.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Very good answer

Former Member
0 Kudos

Hi Arturo,

Please refer to the this [Jco Server programming|http://help.sap.com/saphelp_nw04/helpdata/en/09/c88442a07b0e53e10000000a155106/content.htm].It may help you.

Thanks & Regards

Veerabhadram

Former Member
0 Kudos

Many thanks,

it is very helpful.

If I got it,, then I can start many servers that use the same program ID ? As stated below:

for(int i = 0; I < serverConnections.length; i++) {

serverConnections <i> = new MyFirstServer

("gwhost", //gateway host, often the same as host

"sapgw00", //gateway service, generally sapgw<SYSNR>+

"JCOSERVER01", // corresponds to program ID defined in SM59

repository);

serverConnections <i>.start();

}

Next question is probably more a hint request:

when I need to shutdown the servers then I need to invoke the stopServers method. How do I invoke this method ?

Former Member
0 Kudos

Hi Arturo,

you can invoke the stopservers method after the processing is done.

like

public static void main(String args[])

{

startServers();

doProcess(); // the processing logic

stopServers();

}

Regards

Veerabhadram.