1 Reply Latest reply on Sep 5, 2012 11:09 AM by Randall Hauch

    cache-binary-storage declaration ignored in repository configuration

    Brian Wallis Master

      I have the following repository configuration

       

      {code}

                  <repository name="testRepository" cache-name="testRepositoryCache" cache-container="modeshapeCache">

                      <cache-index-storage data-cache-name="testRepository-index-data" metadata-cache-name="testRepository-index-metadata"

                              lock-cache-name="testRepository-index-locks" cache-container-jndi-name="modeshapeIndexCache" chunk-size="10000"/>

                      <cache-binary-storage data-cache-name="testRepository-binary-data" metadata-cache-name="testRepository-binary-metadata"

                              cache-container="modeshapeCache"/>

       

                  </repository>

      {code}

       

      But the default binary filestore directory is still created and used when I store larger binary values in my repository. There are no errors or other additional logging, the declaration is just silently ignored.

       

      This may be related to the issue with index storage declaration described in MODE-1609 and toward the end of this thread AS7 string-keyed-jdbc-store configuration.

       

      the cache configuration I'm using is as follows, I've put the binary storage and metadata in the same cache container as the main repository storage.

       

      {code}

                  <cache-container name="modeshapeCache">

                      <local-cache name="testRepositoryCache">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="512"/>

                          <string-keyed-jdbc-store datasource="jboss/datasources/JcrDataDS" passivation="false" purge="false">

                              <property name="databaseType">

                                  postgres

                              </property>

                              <property name="createTableOnStart">

                                  true

                              </property>

                              <string-keyed-table prefix="stringbased">

                                  <id-column name="id" type="VARCHAR(200)"/>

                                  <data-column name="datum" type="BYTEA"/>

                                  <timestamp-column name="version" type="BIGINT"/>

                              </string-keyed-table>

                          </string-keyed-jdbc-store>

                      </local-cache>

                      <local-cache name="testRepository-binary-data">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="100"/>

                          <string-keyed-jdbc-store datasource="jboss/datasources/JcrDataDS" passivation="false" purge="false">

                              <property name="databaseType">

                                  postgres

                              </property>

                              <property name="createTableOnStart">

                                  true

                              </property>

                              <string-keyed-table prefix="stringbased">

                                  <id-column name="id" type="VARCHAR(200)"/>

                                  <data-column name="datum" type="BYTEA"/>

                                  <timestamp-column name="version" type="BIGINT"/>

                              </string-keyed-table>

                          </string-keyed-jdbc-store>

                      </local-cache>

                      <local-cache name="testRepository-binary-metadata">

                          <transaction mode="NON_XA"/>

                          <eviction strategy="LIRS" max-entries="2000"/>

                          <string-keyed-jdbc-store datasource="jboss/datasources/JcrDataDS" passivation="false" purge="false">

                              <property name="databaseType">

                                  postgres

                              </property>

                              <property name="createTableOnStart">

                                  true

                              </property>

                              <string-keyed-table prefix="stringbased">

                                  <id-column name="id" type="VARCHAR(200)"/>

                                  <data-column name="datum" type="BYTEA"/>

                                  <timestamp-column name="version" type="BIGINT"/>

                              </string-keyed-table>

                          </string-keyed-jdbc-store>

                      </local-cache>

                  </cache-container>

      {code}