on 11-21-2006 10:50 PM
We are using the JCO 2.1.6 on Linux. We want to have a timeout option on the Client execute API call. We are invoking RFC's using the execute call and sometime if there is a network/Connection problem to SAP Server the execute call never return. We want to timeout this call. We are invoking the execute in synchronous mode.
I will appreciate if someone can let me know the solution of how to end/timeout the execute call.
Thanks in advance
Thanks Abhilash,
Let me try it out and see how things go.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answer. I already tried that and it dosen't work. I think the PoolManager setConnectionTimeout is for timeout for making connection but once connection is established this doesn't play any role.
I want the execute call to get time out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
<b>Connection is treated as timed-out when there is no activity on it for the specified time interval. setConnectionTimeout is used for this purpose</b>
For making connection setMaxWaitTime method is used.
You can try one more thing, write a thread which periodically checks the connection if it is alive using <b>isAlive()</b> method. Because of network problem or any other problem if connection is lost then this method returns false, so you can release connection. Even if isAlive doesnt help you, set your Thread to sleep for the time you want to wait for the response after that release connection.
Regards
Abhilash
Regards
Abhilash
Hi Manoj,
If you are using connection pooling for JCO, you can use the following methods to control time out connections. These methods are part of <b>JCO.PoolManager</b>
setConnectionTimeout(long connection_timeout)
setTimeoutCheckPeriod(long timeout_check_period)
For more details check the JCO API.
Hope this will solve your problem.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.