Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-5043

Result Set is not closed

XMLWordPrintable

      When I use the infinispan-cachestore-jdbc with a configured MariaDB database and set the configuration TableManipulationConfigurationBuilder.createOnStart(false) to false I get warnings in my log file that ResultSets are not closed. You have to set JBoss datasource configuration to:
      <subsystem xmlns="urn:jboss:domain:datasources:6.0">
      ...
       <statement>
               <track-statements>true</track-statements>
        </statement>
      ...
      </datasource>
      <track-statements> will inform you that ResultSets are not closed.
       
      I identified two methods which will bring up a warning:
      Class org.infinispan.persistence.jdbc.impl.table.AbstractTableManager
      Method:
      public TableManager.Metadata getMetadata(Connection connection)

      doesn't close the result set.  

       

      Also Class org.infinispan.persistence.jdbc.stringbased.JDBCStringBasedStore,

      Method private <P> Flowable<P> publish(IntSet segments, Function<ResultSet, Flowable<P>> function)

      Line 666 

      ResultSet rs = ps.executeQuery(); return function.apply(rs).doFinally(() -> JdbcUtil.safeClose(rs)); }, FlowableConnection::close);
      I think that connection is closed before ResultSet.
       
      I attached the warnings in a stracktrace file.
       
       

            wburns@redhat.com Will Burns
            thaefner Tobias Häfner (Inactive)
            Gustavo Lira Silva Gustavo Lira Silva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: