https://issues.apache.org/bugzilla/show_bug.cgi?id=52066
Alexander Pogrebnyak <alex-pub.apache-...@reflexion.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #4 from Alexander Pogrebnyak <alex-pub.apache-...@reflexion.net> 2012-03-20 17:34:44 UTC --- (In reply to comment #3) > The reason an interrupt here would happen is cause WE want to interrupt the > call to queue.poll, to the user, they need to be notified that their call will > fail using a SQLException. > I capitalized WE in the above quote to highlight the wrong approach to this problem. YOU, the tomcat-jdbc, would never interrupt a thread that is stuck in a `borrowConnection`. This action can only be done by the user of your library. > If we don't clear the > flag, the thread can continue to run with a interrupted status, and I'm not > sure that is a good thing. it IS a good thing, because, once again, your library should never initiate the interruption, and if the user does not handle interruption correctly it will get reminded sooner rather than later that something is wrong. Think of it as a RuntimeException. If you know how to hanlde it you will, if you don't let the framework handle it. Swallowing interrupted status is exactly the same issue that plagued Java samples in the early days, when Exception would be swallowed and nothing reported to the caller. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org