Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13439

Result Set is not closed

    XMLWordPrintable

Details

    Description

      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.
       
       

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: