Bug 55342

Summary: Lost interruption
Product: Tomcat Modules Reporter: Mikhail Mazursky <ash2k>
Component: jdbc-poolAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Mikhail Mazursky 2013-08-02 05:54:35 UTC
org.apache.tomcat.jdbc.pool.ConnectionPool#close should not call Thread.interrupted() because interrupt was already reset by code that thrown InterruptedException.

  } catch (InterruptedException ex) {
      if (getPoolProperties().getPropagateInterruptState()) {
          Thread.currentThread().interrupt();
-     } else {
-         Thread.interrupted();
      }
  }
Comment 1 Mikhail Mazursky 2013-08-02 05:57:42 UTC
Also, why this flag (PropagateInterruptState) is false by default? Why it even exists? Why someone may want pool to swallow interruptions?
Comment 2 Keiichi Fujino 2013-09-04 02:34:21 UTC
(In reply to Mikhail Mazursky from comment #1)
> Also, why this flag (PropagateInterruptState) is false by default? Why it
> even exists? Why someone may want pool to swallow interruptions?
This attribute was introduced by BZ52066.
See https://issues.apache.org/bugzilla/show_bug.cgi?id=52066.
Comment 3 Keiichi Fujino 2013-09-04 02:34:42 UTC
Thanks for the report.
Fixed in trunk and 7.0.x and will be included in 7.0.43 onwards.