WAS v8.5 > Reference > Developer detailed usage information

WSIFOperation - Synchronous and asynchronous timeouts reference

When we use the WSIF with the JMS we can set timeouts for synchronous and asynchronous operations.

Defaults for these timeouts are defined in the wsif.properties file:

# maximum number of milliseconds to wait for a response to a synchronous request.
# Default if not defined is to wait forever.
wsif.syncrequest.timeout=10000

# maximum number of seconds to wait for a response to an async request.
# if not defined or invalid defaults to no timeout wsif.asyncrequest.timeout=60

If we use these default values, a synchronous request (such as a WSIFOperation interface executeRequestResponseOperation method call) times out after ten seconds, and an asynchronous request (such as a WSIFOperation interface executeRequestResponseAsync method call) times out after sixty seconds.

The code that processes both of these timeout values uses milliseconds as its unit of time. The WSIFProperties class getAsyncTimeout method multiplies the wsif.asyncrequest.timeout value by 1000, to convert the value from seconds to milliseconds.

We can override these default values for a given request by writing a WSDL extension that sets a JMS property on the operation request with the <jms:property> and <jms:propertyValue> WSDL elements. Set the name of the property to be the name of the timeout from the WSIF properties file.

The following example sets synchronous requests to time out after two minutes (120 seconds):

and the following example disables asynchronous timeouts (a value of zero means wait forever):

When an asynchronous timeout expires, no listener or message data base waiting for the response is notified. The asynchronous timeout is only used to tell the correlation service the stored WSIFOperation can be deleted. For more information about the correlation service, see WSIFOperation - Asynchronous interactions reference.


Related


Enable a WSIF client to invoke a web service through JMS
Writing the WSDL extensions that let your WSIF service access a service at a JMS destination


Reference:

WSIFOperation - Context
wsif.properties file - Initial contents


+

Search Tips   |   Advanced Search