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

JBoss Messaging does not works with MS SQL Server with MS JDBC driver 2.0 in default JDBC configuration

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • EAP_EWP 5.1.0
    • EAP 5.0.0.CR1, EAP 5.0.0.CR2
    • Messaging
    • None
    • MS SQL Server 2005 or 2008
      MS JDBC drivers 2.0

    • Not Required

      Over 700 tests fail on the MS SQL Server with MS JDBC driver 2.0. Problem is caused by following lines in the source code.

      Class: src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
      Method: getBytes(ResultSet rs, int columnIndex)
      Lines: 2510 - 2515.

      InputStream i = rs.getBinaryStream(columnIndex);

      if (i == null)

      { return null; }

      is = new BufferedInputStream(rs.getBinaryStream(columnIndex),
      BUFFER_SIZE);

      Should be fixed as:

      InputStream i = rs.getBinaryStream(columnIndex);

      if (i == null) { return null; }

      is = new BufferedInputStream(i, BUFFER_SIZE);

      Description:
      Problem is caused by JDBC's Adaptive buffering which is default buffering mode in the MS JDBC version 2.0 (in previous version of JDBC was ,,full buffering mode").
      Column can be accessed by the getXXXStream only once in the Adaptive buffering mode. The second attempt causes exception.
      Please see http://msdn.microsoft.com/en-us/library/bb879937.aspx

              gaohoward Howard Gao
              pslavice@redhat.com Pavel Slavicek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: