Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1434

MS-SQL driver closes prepared statements on endRequest but Ironjacamar cache still produces them

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.5.10.Final
    • None
    • None
    • None

    Description

      Discovered in WIldFly 24.0.1 (ironjacamar 1.4.35) with ms-sql JDBC drivers jre11 variants of versions 7.4.1, 8.4.1 and 9.2.1.

      Application code calls prepareStatement() then immediately executeQuery and gets error
      com.microsoft.sqlserver.jdbc.SQLServerException: The statement is closed.

      What I think is going on is that the application has got a connection, used it as above, closed it, then later got the same connection again from the pool to use as above. When the application closes the connection Ironjacamar calls endRequest() on the connection which calls com.microsoft.sqlserver.jdbc.SQLServerConnection.endRequestInternal(), which closes all the open prepared statements on the connection.

      If the problem is as above I would not be able to say which side, Ironjacamar or ms-sql JDBC, is doing the right thing.

      Attachments

        Issue Links

          Activity

            People

              istudens@redhat.com Ivo Studensky
              tadamski@redhat.com Tomasz Adamski
              Votes:
              5 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: