Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3104

OracleExceptionSorter checks for same string multiple times

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Trivial
    • JBossAS-4.0.4.GA
    • JBossAS-4.0.3 SP1
    • JCA service
    • None
    • Low
    • 0
    • 0% 0%

    Description

      org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter.java checks for a number of exceptions twice. 1014, 1033, 1034, 3111, 3113, 3114. This seems inefficient.

      A couple of other suggestions:

      1. Check integer codes instead of doing String.indexOf. I would think that checking integer codes would be more efficient.
      2. Changes TNS checking to look for either a) codes between 12100 and 12299; or b) strings containing ORA-121 or ORA-122.
      3. Consider excluding user defined Oracle errors when looking for specific strings (i.e. SOCKET/TNS). Example:

      if( sqlcode < 20000 || sqlcode >= 21000 )
      {
      then check for specific strings
      }

      Oracle has reserved error numbers (20000 through 20999) for user defined sql errors, and also allows you to specify your own text. If you happen to include text containing "SOCKET", "TNS" or "BROKEN PIPE", then the connection gets closed.

      4. Last, a few more sqlcodes to consider as possible candidates for closing the connection:

      ORA-01089 immediate shutdown in progress - no operations are permitted
      ORA-01090 shutdown in progress - connection is not permitted
      ORA-01092 ORACLE instance terminated. Disconnection forced
      ORA-01094 ALTER DATABASE CLOSE in progress. Connections not permitted
      ORA-03106 fatal two-task communication protocol error

      I would be happy to provide code, I just wasn't sure how to do so, and I'm too busy right now to spend lots of time figuring it out.

      Attachments

        Activity

          People

            weston.price Weston M. Price (Inactive)
            mmcgregor666 Mark McGregor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: