Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-15493

SQL Server Prepared Statements Cache no longer working on WF24 - WF25

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 24.0.1.Final, 25.0.0.Final
    • JCA
    • None
    • Hide

      1. Deploy the attached SQL Server driver module

      2. Set up driver in config file:

      <driver name="sqlserver" module="com.microsoft.sqlserver.jdbc">
           <driver-class&amp;gt;com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class&amp;gt;
      </driver>

      3. Set up a datasource named "TestDS" and include the following:

      <statement>
          <prepared-statement-cache-size>20</prepared-statement-cache-size>
          <share-prepared-statements>true</share-prepared-statements>
      </statement>

      4. Deploy the attached test app (test.war).  Complete project with source attached as "test.zip"

      5. Open http://localhost:8080/test/ in browser and observe that the first iteration of a SQL statement works fine and all the subsequent ones fail

      Show
      1. Deploy the attached SQL Server driver module 2. Set up driver in config file: <driver name= "sqlserver" module= "com.microsoft.sqlserver.jdbc" >      <driver- class& amp;gt;com.microsoft.sqlserver.jdbc.SQLServerDriver</driver- class& amp;gt; </driver> 3. Set up a datasource named "TestDS" and include the following: <statement> <prepared-statement-cache-size>20</prepared-statement-cache-size> <share-prepared-statements> true </share-prepared-statements> </statement> 4. Deploy the attached test app (test.war).  Complete project with source attached as "test.zip" 5. Open http://localhost:8080/test/ in browser and observe that the first iteration of a SQL statement works fine and all the subsequent ones fail

      Wildfly is no longer working with datasource prepared statements cache when using SQL Server driver.  There are reports that this worked through WF 23 and stopped working with WF24.  I've tried playing with using different SQL Server driver versions as well as Hibernate versions in WF25 and it makes no difference.  Disabling prepared statements cache results in behavior as expected.

        1. modules.zip
          1.22 MB
        2. test.war
          5 kB
        3. test.zip
          13 kB

            tadamski@redhat.com Tomasz Adamski
            john.schneider@carrier.utc.com John Schneider (Inactive)
            Votes:
            10 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: