[jboss-jira] [JBoss JIRA] (JBJCA-721) Handle thread's interrupted status differently for call to java.sql.DataSource.getConnection()
Jesper Pedersen (Updated) (JIRA)
jira-events at lists.jboss.org
Mon Jan 9 12:42:10 EST 2012
[ https://issues.jboss.org/browse/JBJCA-721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesper Pedersen updated JBJCA-721:
----------------------------------
Component/s: Core
> Handle thread's interrupted status differently for call to java.sql.DataSource.getConnection()
> ----------------------------------------------------------------------------------------------
>
> Key: JBJCA-721
> URL: https://issues.jboss.org/browse/JBJCA-721
> Project: IronJacamar
> Issue Type: Bug
> Components: Core
> Reporter: Justin Bertram
> Assignee: Jesper Pedersen
> Fix For: 1.0.7.Final, 1.1.0.Alpha5
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list