0 Replies Latest reply on Nov 28, 2007 10:52 AM by Misha Silin

    how to disable cache?

    Misha Silin Newbie

      i am using hibernate 3.1.2, seam 2.0.0.GA, jboss 4.2, oracle 10g

      there is a page where a list of hibernate entity objects are displayed.

      i change some properties of the entity objects directly in database(f.e. with other db client (toad)).

      when i refresh page, even several times, applied changes aren't displayed.

      Reading logs i've noticed that the corresponding query occurs. but it returns old data.

      i have the following hibernate settings :

      hibernate.cfg.xml:
      <hibernate-configuration>
       <session-factory name="java:/applicationSessionFactory">
       <!-- Configuration -->
       <property name="transaction.flush_before_completion">false</property>
       <property name="connection.release_mode">after_transaction</property>
       <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
       <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
       <property name="connection.datasource">java:/oracleDS</property>
      
       <property name="hibernate.cache.use_query_cache">false</property>
       <property name="hibernate.cache.use_second_level_cache">false</property>
       <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
       <property name="hibernate.show_sql">true</property>
       <property name="hibernate.format_sql">true</property>
       <property name="hibernate.use_sql_comments">true</property>
       <property name="hibernate.hbm2ddl.auto">update</property>
      
       <!-- Mapping -->
       <mapping class="mypackage.Ticket"/>
       </session-factory>
      </hibernate-configuration>
      



      "use_query_cache" and "use_second_level_cache" are applied cause jboss writes in logs:

      18:19:39,937 INFO [SettingsFactory] Second-level cache: disabled
      18:19:39,937 INFO [SettingsFactory] Query cache: disabled
      18:19:39,937 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      18:19:39,937 INFO [SettingsFactory] Structured second-level cache entries: disabled


      What does cache my data?
      How to disable it?

      Thanks.