[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - how to disable cache?

TurkishPirate do-not-reply at jboss.com
Wed Nov 28 10:52:52 EST 2007


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 :
anonymous wrote : 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:anonymous wrote : 
  | 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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108542#4108542

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108542



More information about the jboss-user mailing list