Skip to Content
0
Former Member
Apr 20, 2004 at 09:38 AM

JCo: setConnectionTimeout vs. jco.client.idle_timeout

710 Views

Hi,

I posted this question in the WebAS General forum a while

back, but did not receive an answer, so I'm trying here

now ...

The original message follows and can also be found at

In addition, I did test the jco.client.idle_timeout by

setting it to a value of 1 second, but none of the

connections was actually shut down while waiting for the

RFC to complete. Are connections somehow kept alive?

Thanks for any illumination,

Sebastian Millies

IDS Scheer AG

-


8< -


Hi,

I am not sure I understand the connectionTimeout and idle_timeout properties correctly. Let me attempt an

explanation and please correct me if I get it wrong.

(The JCo docs unfortunately are not very explicit).

1. Suppose I create a client like this

<pre> JCO.createClient( props); </pre>

where props contains the setting

<pre> jco.client.idle_timeout=60 </pre>

This will make R/3 (not JCo) close the connection after

60 seconds if it is idle. Idle means there is no traffic

on it. This can happen even if the conenction is still

open, e. g. because the RFC module is taking too long to

return. If this happens, JCo will throw an exception.

I suppose ideally the value of this property should match

the lifetime of the corresponding work process on the R/3

server.

2. Now suppose I create a pool, like this

<pre> JCO.addClientPool( SID, 10, props );

where props again contains the idle_timeout.

Similar to the above, any conenction obtained by

getClient() will be closed by R/3 after the specified

idle time, even if it has not been released back to the

pool.

3. In addition, I can set a pool property

<pre>

JCO.Pool pool = JCO.getClientPoolManager().getPool( SID );

pool.setConnectionTimeout( 60 );

</pre>

which makes JCo (not R/3) close any idle connection after

the timeout period, but only after it has been released

back to the pool.

There is no interaction between the properties in

question: the connection timeout is strictly for pool

management and cannot be set directly on a client.

Have I got all this right?

Thanks,

Sebastian Millies

IDS Scheer AG