If you experience the following warning in your hibernate+ehcache application:
2008-11-20 13:02:42,937 WARN (CacheManager.java:322) - Creating a new instance of CacheManager using the diskStorePath "D:\apache-tomcat-5.5.26\temp" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to D:\apache-tomcat-5.5.26\temp\ehcache_auto_created_1227178962937. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance.
then you need to set the following in your hibernate.cfg.xml file:
<property name="hibernate.cache.provider_class"> net.sf.ehcache.hibernate.SingletonEhCacheProvider </property>