0 Replies Latest reply on Jul 23, 2006 1:54 PM by leulberg

    Dynamic configuration for ehcache in hibernate

    leulberg

      I use the ejb3 interface to hibernate in an dynamic way for persisting. I create an EJB3-Configuration with the API and set it up to use ehcache.

       configuration
       .setProperty("hibernate.dialect", "org.hibernate.dialect.SQLServerDialect")
       :
       :
       .setProperty("hibernate.order_updates", "true")
       .setProperty("hibernate.hbm2ddl.auto", "validate")
       .setProperty("hibernate.cache.provider_class", "org.hibernate.cache.EhCacheProvider");
      


      Furthermore, I have to handle more than one configuration at the same time. For this requirement, I have to handle more than one ehcache configuration, too. There is a way to setup a xml-configuration for ehcache with the hibernate configuration parameter hibernate.cache.provider_configuration_file_resource_path.

      Now my question: Is there any possibility to build up an ehcache configuration programatically and to set up it in the ejb3 configuration of hibernate, too? Or should I use another Cache? Which one?

      Thanks for help