In the core module I decided to use Ehcache's provider for Hibernate and tell it to configure from a file named ehcache-hibernate.xml:
hibernate.cache.provider_class=net.sf.ehcache.hibernate.EhCacheProvider net.sf.ehcache.configurationResourceName=/ehcache-hibernate.xml Then the web module uses ehcache.xml under its resources to separate these caches from the hibernate caches. I am playing with the SimplePageCachingFilter, set in web.xml as: <filter> <filter-name>pageCacheFilter</filter-name> <filter-class>net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter</filter-class> </filter> However, due to the dynamic nature of our application, page caching may not be appropriate. Thanks, Richard Brewster mraible wrote: > > On 11/30/07, Richard Brewster <[EMAIL PROTECTED]> wrote: >> >> I am using AppFuse 2.0 and looking at ehcache. It seems that out of the >> box >> AppFuse uses only the Gzip servlet filter from ehcache. What I want to >> do >> is use ehcache with Hibernate in the core module, and also use ehcache >> for >> other caching in the web module. I think these should use separate >> CacheManagers and that I should do the following: >> >> In the hibernateProperties section of applicationContext-dao.xml >> >> hibernate.cache.use_second_level_cache=true >> hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider > > These are already set, the value below is not. > >> >> hibernate.cache.provider_configuration_file_resource_path=/ehcache-hibernate.xml >> >> I would put caches for use with my Hibernate model classes in >> ehcache-hibernate.xml. > > If you'd rather not configure this in src/main/resources/ehcache.xml, > you're welcome to do this. > >> >> Then in the web module, I would use the ehcache.xml file for web tier >> caches. (I am not sure how to specify the cache provider for the web >> tier. >> Is it net.sf.ehcache.hibernate.EhCacheProvider by default?) > > What do you plan on caching in the web tier? Are you planning on using > the caching filter or manually caching with EhCache's Java API? > > Matt > >> >> The main thing is to separate the cashes used by Hibernate and by the web >> module. I'd appreciate any comments. >> >> Thanks, >> >> Richard Brewster >> >> -- >> View this message in context: >> http://www.nabble.com/Ehcache-providers-and-CacheManagers-in-a-modular-project-tf4914320s2369.html#a14067486 >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Ehcache-providers-and-CacheManagers-in-a-modular-project-tp14067486s2369p14584383.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]