1 Reply Latest reply on Apr 23, 2008 9:15 PM by christian.bauer

    Disable Session Cache (?)

    dmg

      Fields in my database are updated by an external application. However, these changes are not being reflected in my  interface. I believe the data is being pulled from the Hibernate Session Cache.


      I've tried disabling Hibernate's Cache by adding the following properties to my persistence.xml:


      <property name="hibernate.cache.use_second_level_cache" value="false" />


      <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider" />


      but neither have an effect.


      I can hack around this by doing entityManager.clear() in my data models and entityManager.refresh() in my EntityHome subclasses, but this is not ideal. How can I configure Hibernate to always query the database?


      Thanks,
      Dan