-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ehcache caches, but doesn't hit.assigned key, no ehcache.xml
PostPosted: Thu Mar 17, 2005 1:28 am 
Regular
Regular

Joined: Mon Sep 29, 2003 9:39 am
Posts: 67
Hibernate version:
2.1.8
Mapping documents:
<...mutable="false">
<cache usage="read-only"/>
<id name="id" column="name">
<generator class="assigned"/>
</id>
...
Code between sessionFactory.openSession() and session.close():
getHibernateTemplate().loadAll(com.x.MyClass);

Full stack trace of any exception that occurs:
No Exceptions
Name and version of the database you are using:
MS SQL Server 2k + jtds 1.0.2
The generated SQL (show_sql=true):
...
Debug level Hibernate log excerpt:
log4j.properties->org.hibernate.cache=DEBUG

My synthetic keyed class hits, my assigned key classes don't. The synth are tables from my app, the assigned are legacy from the same database. All usage classes cache, according to
logs, but ony the synth hits. These are read-only objects for dropdown menus etc.

I have not specified an ehcache.xml file. Is ehcache.xml mandatory? Does ehcache support assigned keys out of the box?

Thanks!


Top
 Profile  
 
 Post subject: QueryCache disabled in Spring by default
PostPosted: Thu Mar 17, 2005 12:30 pm 
Regular
Regular

Joined: Mon Sep 29, 2003 9:39 am
Posts: 67
I had enabled query caching in my hibernate config,
but HibernateTemplate has CacheQueries false by default.

Setting getHibernateTemplate().setCacheQueries(true);
before querying shows hits in the log.

I would still be interested in whether the ehcache.xml is necessary or
the defaults are acceptable?

Where do you put this file in your package heirarchy assuming you put your mappings in a package called org.x.hibernate.mappings?


Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.