On 19 November 2013 14:59, Caldarale, Charles R <chuck.caldar...@unisys.com> wrote: >> From: David Bullock [mailto:david.bull...@machaira.com.au] >> Subject: Re: Tomcat connection pool "bleeding" under heavy load > >> In PooledConnection#borrow(int,String,String) when handling >> InterruptedException, the code there does: > >> Thread.interrupted();//clear the flag, and bail out > >> but if the comment is correct, then the code is wrong (should >> be Thread.isInterrupted()). > > No, Thread.interrupted() is a static method that checks if the _current_ > thread has been interrupted. Calling Thread.isInterrupted() would be > illegal, since that is an instance method, and is used primarily to determine > if some other thread has been interrupted. Also, the isInterrupted() method > does not clear the interrupted flag for the target thread, whereas > Thread.interrupted() does clear it for the current thread.
True. Sorry about that mis-information. cheers, David. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org