Setting the Socket Timeout Value

When setting the socketTimeout value, you need to consider the executionTimeout value. The executionTimeout property is the maximum amount of time allowed for IMS Connect to send a message to IMS™ and receive a response from IMS. The socketTimeout value encapsulates the executionTimeout value. Therefore, the socketTimeout value should be greater than the executionTimeout property because the socket may time out unnecessarily if its value is set to less than the executionTimeout value. The following table lists suggested values for socketTimeout based on executionTimeout values.

Execution Timeout Value (milliseconds) Execution Timeout Behavior Suggested Socket Timeout Value
0 (or no value) The default value from the IMS Connect configuration file is used. The socket timeout value should be greater than the execution timeout default value specified in the IMS Connect configuration file.
1 - 3,6000,000 The wait response times out after the specified millisecond value. The socket timeout value should be greater than the execution timeout value.
-1 The wait response is indefinite. Set the socket timeout value  to 0 so that the connection waits indefinitely.

There are two ways to set the socket timeout value. You can either write an application using the JCA Common Client Interface (CCI) to access the getter and setter methods provided with the IMSInteractionSpec or use the tooling provided by WebSphere® Studio Application Developer Integration Edition.

Using the CCI application to set a socket timeout value

If you are creating a CCI application, you will have access to the setSocketTimeout method of the IMSInteractionSpec. To use the setSocketTimeout method, you need to instantiate a new IMSInteractionSpec or obtain the IMSInteractionSpec from your specific interaction. Then set the socketTimeout value for the IMSInteractionSpec by using the setSocketTimeout method provided by the IMSInteractionSpec class. For example:  

interactionSpec.setSocketTimeout(timeoutValue1);
interaction.execute(interactionSpec,input,output); 

interactionSpec.setSocketTimeout(timeoutValue2);
interaction.execute(interactionSpec,input,output);

Using WebSphere Studio Application Developer Integrated Edition to set a socket timeout value

You can use WebSphere Studio Application Developer Integrated Edition to set the socket timeout value when you initially define the operation binding properties for an IMS service. To edit the operation binding properties that are already defined for an IMS service, complete the following steps:

  1. Open the appropriate IMS binding WSDL file using the WSDL Editor.
  2. In the Bindings container of the Graph view, expand the IMS binding WSDL file and expand the appropriate binding operation file.
  3. Select the operation extensibility element (for example, ims:operation) and edit the values of the properties in the property table.
  4. Select the operation extensibility element again to indicate that changes have been made.
  5. Close the editor and click Yes to save your changes.
Related concepts
Execution timeout
Socket timeout
Related tasks
Setting execution timeout values
Related reference
Valid execution timeout values
Connection properties
IMSInteractionSpec properties
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.