On 12/02/07, Tom Lipkis <[EMAIL PROTECTED]> wrote:
> We should modify that action, switching the stream
> into an EOF mode where the underlying connection is no longer
> blocked, but no IOExceptions are triggered either. I'll open
> a JIRA issue for that.
Thanks!
> Regarding the tolerance debate, maybe we can add a "zero tolerance"
> mode to the connection managers in HttpConn 4. One that shuts down
> the JVM if a connection leak is detected. I'll keep it in mind.
If you do this, please allow the application to decide what happens if
the condition is detected. In testing, I might want to exit, but in
production, exiting the JVM is a bit extreme.
One tool I use to help locate unclosed streams is in
http://lockss.cvs.sourceforge.net/lockss/lockss-daemon/src/org/lockss/util/MonitoringInputStream.java?revision=1.4&view=markup
It records a stack trace when the stream is opened, which it logs iff
the stream is GCed without having been closed.
Findbugs is pretty good at finding potentially unclosed streams, and a
lot more besides ...
S///
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]