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

Check JDBC Resource Adapter Exception handling

XMLWordPrintable

      I just found this bad error handling in the WrappedCallableStatement:

      public byte getByte(String parameterName) throws SQLException
      {
      try

      { return cs.getByte(parameterName); }
      catch (SQLException e)
      { checkException(e); return 0; }
      }

      The idea is supposed to be that checkException looks for fatal errors and closes the exception
      before given the exception to the application:

      This needs making more explicit to avoid errors:

      public byte getByte(String parameterName) throws SQLException
      {
      try
      { return cs.getByte(parameterName); }

      catch (SQLException e)

      { throw checkException(e); }

      }

              adrian.brock Adrian Brock (Inactive)
              adrian.brock Adrian Brock (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: