on 10-12-2004 11:09 PM
hi JCO experts,
I am connecting to a really slow back end system using Jco. Lets say
a) JCO Client.execute takes 5 minutes.
b) I want to run this execution in a seperate thread
Is there a way I can kill the JCO connection itself after 2 minutes? (Imagine something like destroying the connection or closing the socket port)
Kiran
Hi Kiran,
Use Class <a href="http://www.huihoo.org/openweb/jco_api/com/sap/mw/jco/JCO.PoolManager.html">JCO.PoolManager</a>.
It has get & set methods for ConnectionTimeOut method.
The
Hope it helps.
Regards,
Maheswaran.B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kiran,
what about using the two methods provided by the com.sap.mw.jco.JCO.Connection class?
disconnect()
public abstract void disconnect()Closes the connection to the remote system.
abort()
public abstract void abort(java.lang.String message)Aborts the connection to the remote system, i.e. tries to send a final message to the host before it disconnects.
Parameters:
message - the final message that will be sent to the remote system.
regards
Dionisios
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
there should be default timeout and exception for calls like these, it sounds like something they would build. But I'm not sure if you can set the timeout on it. You could build such an exception handling yourself and try to drill down the system and shut down the connection, but I suppose that's like reiventing the wheel somehow.
regards
Dionisios
Hi
I have the same problem as Kiran, and I have tried a few things already. The com.sap.mw.jco.JCO.Pool only support timeout for idle connection, or for waiting for a free connection. I also tried disconnect() and abort() but I get the message:
Exception: Connection cannot be disconnected. Connection currently used in another thread.
I haven't found any solution yet. Does anybody have any ideas?
Regards
Alex
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.