java.net.SocketTimeoutException from work item save in stand-alone Java application
We have a stand-alone Java application that uses the RTC SDK to create and/or update custom work items. Occasionally, our application encounters a java.net.SocketTimeoutException when performing a work item save via WorkItemWorkingCopy.save(null) on our custom work items, especially on heavily load / slow RTC servers. The RTC project area runs a number of custom operation advisors and participants. I'm working to improve the performance of our custom operation advisors and participants. However, it would really be helpful if we could increase the socket timeout for work item saves from our stand-alone Java application. Is this possible? If so, how?
Thanks,
Geoff Alexander
Thanks,
Geoff Alexander
One answer
To answer my own question, I found two ITeamRepository methods, getConnectionTimeout() and setConnectionTimeout(int timeoutInSeconds), for getting and setting the connection timeout. In calling getConnectionTimeout(), I found that the default connection timeout for my RTC repository is 480 seconds. I was able to use setConnectionTimeout(int timeoutInSeconds) to set the connection timeout a larger value.
Comments
yep, ran into the same problem a few weeks back.. the timeout value is the TOTAL TIME connected, NOT the API call time.
my app takes 20-28hours...(480 seconds just ain't long enough!)
Our application is a long running, transactional based server that connects / disconnects from RTC as it processes certain transactions. Usually, 480 seconds is long enough. But occasionally more time is required, especially, when debugging Java code running on the RTC server.