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

JDBC cache loader "dropTablesOnExit" does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • 5.1.0.CR1
    • Loaders and Stores
    • None
    • Hide

      configure a cache loader using H2 db as in description
      start the cache
      stop the cache
      check to see if the table/data is left behind

      expected result: no table/data left behind
      real result: the cache table/data still there

      Show
      configure a cache loader using H2 db as in description start the cache stop the cache check to see if the table/data is left behind expected result: no table/data left behind real result: the cache table/data still there

    Description

      I configure my JDBC cache loader with H2 engine using filesystem as store. I set the "dropTablesOnExit" to "true", but I still see the tables/and the data after I stop the cache. Basically, "dropTablesOnExist" has no effect.

      sample config:
      <loader
      class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"
      fetchPersistentState="true"
      purgeOnStartup="false">

      <properties>
      <property name="stringsTableNamePrefix" value="ISPN_STRING_TABLE"/>
      <property name="idColumnName" value="ID_COLUMN"/>
      <property name="dataColumnName" value="DATA_COLUMN"/>
      <property name="timestampColumnName" value="TIMESTAMP_COLUMN"/>
      <property name="timestampColumnType" value="BIGINT"/>
      <property name="connectionFactoryClass" value="org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory"/>

      <property name="connectionUrl" value="jdbc:h2:file:/tmp/testStore;DB_CLOSE_DELAY=-1"/>
      <property name="userName" value="sa"/>
      <property name="driverClass" value="org.h2.Driver"/>
      <property name="idColumnType" value="VARCHAR(255)"/>
      <property name="dataColumnType" value="BINARY"/>
      <property name="dropTableOnExit" value="true"/>
      <property name="createTableOnStart" value="true"/>
      </properties>

      </loader>

      Attachments

        Activity

          People

            manik_jira Manik Surtani (Inactive)
            dex80526_jira dex chen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: