-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
Workaround Exists
-
Currently in org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(Subject, ConnectionRequestInfo) if the calling thread has it's "interrupted" status set to "true" a ResourceException will be thrown. This can be confusing to users. Furthermore, the pool shouldn't care about the thread's interrupted status. The only reason the ResourceException is thrown is because getConnection ultimately accesses java.util.concurrent.Semaphore.tryAcquire(long, TimeUnit) which throws an InterruptedException if the thread's interrupted status is "true" (see http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Semaphore.html#tryAcquire%28long,%20java.util.concurrent.TimeUnit%29).
We could either clear the thread's interrupted status by calling Thread.interrupted() without saving it or save it and restore the interrupted status back to the thread when the call is complete.
- is related to
-
JBPAPP-7863 Improve error message when thread calling java.sql.DataSource.getConnection() is already interrupted
- Closed