* [EMAIL PROTECTED]: > Author: ehillenius > Date: Sun Dec 10 23:19:58 2006 > New Revision: 485536 > > URL: http://svn.apache.org/viewvc?view=rev&rev=485536 > Log: > WICKET-155 > > Modified: > incubator/wicket/trunk/wicket/src/main/java/wicket/Resource.java > > Modified: incubator/wicket/trunk/wicket/src/main/java/wicket/Resource.java > URL: > http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/Resource.java?view=diff&rev=485536&r1=485535&r2=485536 > ============================================================================== > --- incubator/wicket/trunk/wicket/src/main/java/wicket/Resource.java > (original) > +++ incubator/wicket/trunk/wicket/src/main/java/wicket/Resource.java Sun Dec > 10 23:19:58 2006 > @@ -18,6 +18,7 @@ > > import java.io.OutputStream; > import java.net.SocketException; > +import java.sql.SQLException; > import java.util.Map; > > import org.apache.commons.logging.Log; > @@ -254,26 +255,32 @@ > boolean ignoreException = false; > while (throwable != null) > { > - if (throwable instanceof SocketException) > + if (throwable instanceof SQLException) > + { > + break; // leave false and quit loop > + } > + else if (throwable instanceof SocketException)
Hi Eelco, I didn't necessarily follow the whole debate, but I wonder why you have to catch an SQLException in Wicket code! Do you assume the Wicket application retrieves data from an SQL database? FWIW here is the code used in Cocoon, it's another half-baked hack that also analyzes the error message: // Check if the client aborted the connection if (e instanceof SocketException) { if (e.getMessage().indexOf("reset") > -1 || e.getMessage().indexOf("aborted") > -1 || e.getMessage().indexOf("connection abort") > -1) { throw new ConnectionResetException("Connection reset by peer", e); } } else if (e instanceof IOException) { // Tomcat5 wraps SocketException into ClientAbortException which extends IOException. if (e.getClass().getName().endsWith("ClientAbortException")) { throw new ConnectionResetException("Connection reset by peer", e); } } -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/