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

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.2
    • Fix Version/s: EAP_EWP 5.2.0
    • Component/s: JCA
    • Labels:
      None
    • Affects:
      Release Notes
    • Release Notes Text:
      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>
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      NEW

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jbertram Justin Bertram
                  Reporter:
                  jbertram Justin Bertram
                  Writer:
                  Russell Dickenson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: