Hi,
I'm using Restlet 2.1.2 (JavaEE) on Tomcat 5.5.
I have a ServerResource implementation that returns an XML response to the
client. When the client decides not to wait (like ClientResource.handleOutbound
that apparently waits for 120 secs) it results in a ClientAbortException as
expected. I don't want the server log flooded with this exception though.
Inspecting the Restlet code, ServerAdapter.commit catches this exception and
uses Call.isBroken to decide if it should log "The connection was broken. It
was probably closed by the client." as INFO or it should log the whole
exception (with stacktrace) as SEVERE.
Call.isBroken is implemented as such:
public static boolean isBroken(Throwable exception) {
boolean result = false;
if (exception.getMessage() != null) {
result = (exception.getMessage().indexOf("Broken pipe") != -1)
|| (exception
.getMessage()
.equals("An existing connection must have been closed by the remote
party.") || (exception
.getMessage()
.equals("An open connection has been abandonned by your network
stack.")));
}
return result;
}
So my question is this: Would it make sense for Call.isBroken to include a
check to see if the thrown exception class name is "ClientAbortException" and
return true if so?
Best regards,
Jacob Poder
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3063107