Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7863

Improve error message when thread calling java.sql.DataSource.getConnection() is already interrupted

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.2.0
    • EAP_EWP 5.1.2
    • JCA
    • None
    • Release Notes
    • Hide
      When a thread's interrupted status was <literal>true</literal> and it called java.sql.DataSource.getConnection() for a JCA datasource, it resulted in error message <screen>javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms</screen>. To assist debugging the following text has been added to this error message: <screen>The 0 ms wait time suggests the thread was already interrupted before attempting to acquire the connection. Ensure the calling thread's interrupted status is cleared before calling getConnection().</screen>
      Show
      When a thread's interrupted status was <literal>true</literal> and it called java.sql.DataSource.getConnection() for a JCA datasource, it resulted in error message <screen>javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms</screen>. To assist debugging the following text has been added to this error message: <screen>The 0 ms wait time suggests the thread was already interrupted before attempting to acquire the connection. Ensure the calling thread's interrupted status is cleared before calling getConnection().</screen>
    • Documented as Resolved Issue
    • NEW

      Currently when a thread's interrupted status is "true" and it calls java.sql.DataSource.getConnection() for a JCA datasource it receives this somewhat cryptic error message:

      javax.resource.ResourceException: Interrupted while requesting permit! Waited 0 ms

      We should improve this error message (or create a new one) so that the root cause can be more easily determined.

      Note: we should not change the current behavior (i.e. throwing an exception) as it isn't technically a bug and it's possible that clients rely on this behavior. However, it could be changed in the next major release.

            rhn-support-jbertram Justin Bertram
            rhn-support-jbertram Justin Bertram
            Russell Dickenson Russell Dickenson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: