Network Deployment (Distributed operating systems), v8.0 > Reference > Developer detailed usage information


WSIFOperation - Synchronous and asynchronous timeouts reference

When you use the Web Services Invocation Framework (WSIF) with the JMS you can set timeouts for synchronous and asynchronous operations.

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

# maximum number of milliseconds to wait for a response to a synchronous request.
# Default value 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 you 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):

<jms:propertyValue name="wsif.syncrequest.timeout" type="xsd:string" value="120000"/> 
and the following example disables asynchronous timeouts (a value of zero means wait forever):
<jms:propertyValue name="wsif.asyncrequest.timeout" type="xsd:string" value="0"/> 

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 that the stored WSIFOperation can be deleted. For more information about the correlation service, see WSIFOperation - Asynchronous interactions reference.
Enable a WSIF client to invoke a web service through JMS
Write the WSDL extensions that let your WSIF service access a service at a JMS destination


Related


WSIFOperation - Context
wsif.properties file - Initial contents
WSIFOperation interface

+

Search Tips   |   Advanced Search