Jim Redman <[EMAIL PROTECTED]> writes: > The code in the exception clause of: > > public void write (byte[] request) throws IOException > > in XmlRpcClientLite does not seem to be effective in handling > keep-alive timeouts. The solution that works for me is to repeat the > call to: > > Object execute (String method, > Vector params) throws XmlRpcException, IOException > { > > the code we've been using looks like this: > > public Object execute (String method, Vector params) > throws XmlRpcException, IOException > { > try { > return executeInternal(method, params); > } catch (Exception e) { > System.err.println("Warning: Execute Internal (" + method + > ") - > " + e.getMessage() + " transient error - retrying"); > } > > // we'll give it two attempts, if it fails the first time it will > // come here for a retry > client = null; // make sure > return executeInternal(method, params); > } > > > public Object executeInternal (String method, Vector params) > <<<<----- the old execute method > throws XmlRpcException, IOException > { > > Unless someone has a better solution, I'd like to get the code into > the distro so that I don't have to modify future releases of the > library.
Interesting. Submit a patch <http://jakarta.apache.org/site/source.html> with multiple retries (so a constant or something can be changed to configure the number of retries to attempt), and remove the early return. Also, I'm not especially familiar with the client code, but does this change belong in the XmlRpcClient super-class? Dan