cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <Peter.Hunsber...@stjude.org>
Subject IOException closing stream in Cocoon Servlet
Date Tue, 20 Jan 2004 22:28:09 GMT
It appears that if you attempt to close an already closed stream you get
an IO exception.  This means that if Cocoon gets stopped and restarted
it is possible, in at least some circumstances, for Cocoon to throw an
IOException in org.apache.cocoon.servlet.CocoonServlet.java at line 1205
(the current v 2.1.3 code).  I think that the code should probably
swallow the IOException in this case? Probably something like:

            } catch (IOException ie) {
                if ( !"The stream has been closed".equals(
ie.getMessage() ) )
                    getLogger().error("Cocoon got an Exception while
trying to close stream.", ie);

If only to keep the logs clean and not hide any real exception; in our
case we're throwing our own BadSessionException just prior to this. 

Peter Hunsberger



Mime
View raw message