SAP JCo 3.1 connecting to Load Balancer and connection pool configured only opens 1 connection

865 Views Asked by At

I have written a sample POC java program that uses JCO 3.1 to execute a stress load on SAP. When I use the following jcoDestination file it works great and opens up to 8 out of the 10 configured connections to handle the load I'm sending to SAP.

#
# APPLICATION SERVER jcoDestination
# 
jco.client.user=<username>
jco.client.passwd=<password>
jco.client.lang=en
jco.client.client=<client-number>

# Pooling Configuation
jco.destination.pool_capacity=10
jco.destination.peak_limit=10
jco.destination.max_get_client_time=30000
jco.destination.expiration_time=600000
jco.destination.expiration_check_period=60000
jco.destination.pool_check_connection=1

# Direct Connection
jco.client.ashost=<application server hostname>
jco.client.sysnr=<system-number>

# Optimization
jco.client.serialization_format=columnBased

But when I change the jcoDestination file to use a message server as follow, only 1 connection is opened.

So my question would be, do the java code to get an instance of the destination, the function and eventually execute the function is different depending if the connection is to an AS or a MS ?

If so, can you please give me some hints on what needs to be changed ? SAP JCo documentation is not that much helpful.

# 
#  LOAD BALANCER jcoDestination
# 
jco.client.user=<username>
jco.client.passwd=<password>
jco.client.lang=en
jco.client.client=<client-number>

# Pooling Configuation
jco.destination.pool_capacity=10
jco.destination.peak_limit=10
jco.destination.max_get_client_time=30000
jco.destination.expiration_time=600000
jco.destination.expiration_check_period=60000
jco.destination.pool_check_connection=1

# Load Balancing
jco.client.mshost=<message-server hostname>
jco.client.group=<group name>
jco.client.r3name=<name>
jco.client.msserv=<service>

# Optimization
jco.client.serialization_format=columnBased
0

There are 0 best solutions below