file store and string-keyed-jdbc-store seem to be ignored for replicated-cache and distributed-cache in as 7.1.3
conorroche Jan 12, 2013 2:51 PMHi,
I have been trying to configure cache store for an infinispan cache on jboss 7.1.3 (built from the tag from github) domain mode, both file store and string-keyed-jdbc-store work fine for me when using local cache, e..g:
This works fine in standalone-full.xml:
<subsystem xmlns="urn:jboss:domain:infinispan:1.3">
....
<cache-container name="pin-cache-container"
default-cache="pin-cache" jndi-name="java:jboss/infinispan/pins"
start="EAGER">
<local-cache name="pin-cache">
<file-store preload="true" passivation="false" fetch-state="true"
purge="false"/>
</local-cache>
</cache-container>
<subsystem>
it creates the pin-cache-container dir and sub cache dirs inside the data/infinispan dir
And so does this:
<subsystem xmlns="urn:jboss:domain:infinispan:1.3">
....
<cache-container name="pin-cache-container"
default-cache="pin-cache" jndi-name="java:jboss/infinispan/pins"
start="EAGER">
<local-cache name="pin-cache">
<transaction mode="FULL_XA" />
<string-keyed-jdbc-store datasource="java:/DemandAPIDS"
shared="true" preload="true" passivation="false" purge="false">
<property name="databaseType">MYSQL</property>
<property name="createTableOnStart">true</property>
<string-keyed-table prefix="node">
<id-column name="id" type="VARCHAR(100)" />
<data-column name="value" type="BLOB(1200)" />
</string-keyed-table>
</string-keyed-jdbc-store>
</local-cache>
</cache-container>
<subsystem>
it creates the table and data in my db.
But using the same cache store configs appears to do nothing when i use them with both replicated and distributed cache on our cluster nodes in standalone-full-ha.xml, the cache works but not the persistence to the cache store. I dont see any errors it just appears to not use the cache store configuration at all.
<cache-container name="pin-cache-container"
default-cache="pin-cache" jndi-name="java:jboss/infinispan/pins"
start="EAGER">
<replicated-cache name="pin-cache" mode="ASYNC">
<file-store preload="true" passivation="false" fetch-state="true"
purge="false"/>
</replicated-cache>
</cache-container>
Here nothing is written to the data/infinispan dir and I dont see any errors/warnings.
with this:
<cache-container name="pin-cache-container"
default-cache="pin-cache" jndi-name="java:jboss/infinispan/pins"
start="EAGER">
<replicated-cache name="pin-cache" mode="ASYNC">
<transaction mode="FULL_XA" />
<string-keyed-jdbc-store datasource="java:/DemandAPIDS"
passivation="false" preload="true" purge="false" shared="true">
<property name="databaseType">MYSQL</property>
<property name="createTableOnStart">true</property>
<string-keyed-table prefix="node">
<id-column name="id" type="VARCHAR(100)" />
<data-column name="value" type="BLOB(1200)" />
</string-keyed-table>
</string-keyed-jdbc-store>
</replicated-cache>
</cache-container>
It again appears to ignore it, it does not create the table in the database and does not log anything, the cache data itself does replicate but I want to use the store for persistence across restarts...
Has anyone gotten cach stores to work in in 7.1.3?