Is it possible to force a timeout value for client-to-broker calls?

I’m using a EntireX Java Client generated from IDL file. This works fine. However, there are cases where for specific input parameters of the call, the replies from the broker return after a very long time - 20 seconds.

remark: I intentionally not want to deal with the question of tuning the remote server which conveys the reply back to the broker.

Instead, What I like to know is whether there is a way for the client, setup a timeout value for the requests being sent to the broker?
If the broker supports it, I expect to get an exception on timeout which will break the current call and return control back to the calling client.

Thanks

Hello Avi,

sure, this is possible: in the client application just call the method wrapper.setDefaultWaittime(String wait), where “wrapper” is an instance of the interface object class generated by the Java Wrapper.
See http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-5_sp1/EntireX/9-5-SP1_EntireX/aci_java/com/softwareag/entirex/aci/BrokerService.html#setDefaultWaittime(java.lang.String)

BTW, the default timeout is 60 seconds.

Thank you you very much Rolf for the quick usable response.
As usual, you are very helpfull