07-26-2011 09:53 AM
I want to set connection timeout for all http connection bes/mds,direct tcp,wifi.I have tried putting connectiontimeout parameter in connection string but its not working.I want to set smaller time than 2 mins for http connection.Can someone plz help me on this?
07-29-2011 04:50 PM
The following information is my experience for pre OS 5.0 code. I believe with ConnectionFactory and the OS 6.0 there are better timeout functionality, so if you are looking to run only in OS 5.0 and above, then check this out.
The connectionTimeout suffix is only supported for BES/MDS connections. There is a way of casting your http connection as a SocketConnectionEnhanced, then setting a timeout (look at the API documentation), but I believe this only works direct TCP connections. So basically if you are running pre OS 5.0 code, you will have to code your own Timeout processing, by say starting a Timer and having the Timer close your httpConnection if it is still running when the timeout time has passed. Sorry.