6 Replies Latest reply on Dec 4, 2007 9:34 AM by Tom Baeyens

    centralize cache configurations

    Tom Baeyens Master

      the hibernate cache configurations are now spread over the mapping files. those should all be centralized into one configuration file.

      i've already created an empty file called pvm.cache.xml

      also i added a reference to that file in the jbpm.dbtest.cfg.xml like this

       <properties resource="hibernate.properties" />
       <mapping resource="pvm.definition.hbm.xml" />
       <mapping resource="pvm.execution.hbm.xml" />
       <mapping resource="pvm.type.hbm.xml" />
       <mapping resource="pvm.wire.hbm.xml" />
       <mapping resource="pvm.queries.hbm.xml" />
       <mapping resource="test.hbm.xml" />
       <cache-configuration resource="pvm.cache.xml" />

      the implementation of the parsing is still todo. instructions can be found in org.jbpm.wire.binding.HibernateConfigurationBinding line 152 :

      } else if ("cache-configuration".equals(XmlUtil.getTagName(configElement))) {
       String cacheConfigurationResource = configElement.getAttribute("resource");
       // parse the cache configurations in the same way as the hibernate cfg schema
       // translate the contents of the file into invoke operations for methods
       // Configuration.setCacheConcurrencyStrategy(String clazz, String concurrencyStrategy, String region)
       // Configuration.setCollectionCacheConcurrencyStrategy(String collectionRole, String concurrencyStrategy)

      Guillaume, can you take this one ?