Socket timeout

Socket timeout is the maximum amount of time the IMS™ TM resource adapter (also known as IMS Connector for Java™) will wait for a response from IMS Connect before disconnecting the socket and returning an exception to the client application.

If there are network problems or routing failures, the socketTimeout property prevents a hang in the system where the client using the IMS TM resource adapter is waiting indefinitely for a response from IMS Connect. Because the socketTimeout property is based on the TCP/IP sockets with which IMS Connect and the IMS resource adapter use to communicate, the socketTimeout property is not applicable with Local Option.

With the socketTimeout property, you can set individual timeout values for a particular interaction using a socket. The value, in milliseconds, can be set on the socketTimeout property in IMSInteractionSpec. If the socketTimeout property is not specified for an interaction or it is set to zero milliseconds, this means there is no socket timeout and the connection will wait indefinitely. The default socket timeout value is zero.

When determining the socket timeout value, other existing timeout values should be taken into account. For example, browser session timeout value, Execution Timeout, EJB transaction timeout value, WebSphere® Application Server connection timeout value, and HTTP session timeout value used by servlets and stateful session beans.

If a valid socket timeout value is specified for a particular interaction and socket timeout occurs, a java.io.IOInterruptedException is thrown and the J2EE JCA exception, javax.resource.spi.CommException is raised. The J2EE JCA exception message indicates that the client has spent more time than was allocated by the socketTimeout value to communicate with IMS Connect.


Feedback