Possible to set number of retries for client stub?
Hi,
I'm having a sort of problem here; I can't figure out how to set the number of times a client-stub will retry connection before giving up and throwing an exception. I've scoured the internet to no avail :(
Basically I'm looking for some setting or mechanism that would allow me to set the number of times a stub retries its connection to the end point before giving up. Preferably it would be possible for it to simply try once and then immediately fail rather than retrying at all.
Is this possible at all? I have not been able to find any documentation on it.
I'd appreciate any insight anyone has.
- Login or register to post comments
- Printer friendly version
- 299 reads











With just using Axis2 you
With just using Axis2 you can not tell a number of retries that Axis2 use before it throws an exception. One thing you can do is you can write your client so that it will call your stub few times and throw exception each time it get the connection exception. Or else we can use something like Reliable messaging mechanism. That that layer will taking care of that , and even you can configure number of re tries you want to make.
Hmm, maybe it's just me but
Hmm, maybe it's just me but this seems like a pretty big shortcoming in Axis2... of course I'm not terribly familiar with the internal workings but it doesn't seem like it should be that complicated to simply set the retry count :(
Also I don't believe I can simply catch the ConnectException; the generated stub method call only throws a RemoteException which occurs after 3 timeouts (ConnectExceptions). These appear to be caught internally in the client stub. Currently we're generating the client using the WSDL2Code feature of WSAS and I'd rather not have to make manual changes if at all possible.
Anyway thanks for the reply; if anyone else has any other suggestions they would still be appreciated :D
This is not a major
This is not a major shortcoming. The stub & stub generation tools (we will have to add another option to specify the retries) have been kept as simple as possible. If you need to do advanced stuff, you always have the option of handling it in your client which calls the stub or using WS-RM.
Regards
Afkham Azeez