I have some problem configuring jdbc-store for infinispan. I have defined a local cache with this configurations:
<cache-container name="MyCacheContainer">
<local-cache name="MyCache">
<expiration max-idle="60000" interval="6000"/>
</local-cache>
</cache-container>
I need to persist the cache so I'm trying to use jdbc-store, using this data source
<datasource jta="true" jndi-name="java:jboss/datasources/MyDS" pool-name="MyDS" enabled="true" use-ccm="true">
<connection-url>jdbc:h2:file:${jboss.server.data.dir}/db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver-class>org.h2.Driver</driver-class>
<driver>h2</driver>
<security>
<user-name>abc</user-name>
<password>abc</password>
</security>
</datasource>
When i try to configure the jdbc-store in the wildfly web console i had this error:
Internal Server Error
{
"outcome" => "failed",
"result" => {"step-1" => undefined},
"failure-description" => "JBAS014883: No resource definition is registered for address [
(\"subsystem\" => \"infinispan\"),
(\"cache-container\" => \"MyCacheContainer\"),
(\"local-cache\" => \"MyCache\"),
(\"jdbc-store\" => \"JDBC_STORE\")
]",
"rolled-back" => true
}
If i manually edit the standalone.xml adding this configs
<cache-container name="MyCacheContainer">
<local-cache name="MyCache">
<expiration max-idle="60000" interval="6000"/>
<string-keyed-jdbc-store preload="false" passivation="false" purge="false" datasource="java:jboss/datasources/MyDS"/>
</local-cache>
</cache-container>
I have regular cache serialization on the db, but it doesn't work as expected because data are removed from the db (not from memory) every 60000 milliseconds regardless they are idle. So, if I restart wildfly the cache is empty. Moreover i noticed that web console still say that jdbc-store in disableb and if I use file-store instead of jdbc-store all works fine, so I suspect that there's some problem in my configs.