View Full Version : ehcache example?
Oct 8th, 2004, 05:36 PM
Is there an example using EhCacheFactoryBean?
Thanks to those who build it into 1.1.1 ! Like magic, it's appeared just when I need it! :-)\
Oct 8th, 2004, 08:04 PM
I just added a new page on Spring wiki that shows how to use Spring Integration for EHCache. Caching the result of methods using Spring and EHCache (http://opensource.atlassian.com/confluence/spring/display/DISC/Caching+the+result+of+methods+using+Spring+and+EHC ache)
I will implement some of the improvements and add this interceptor to JIRA.
Oct 8th, 2004, 08:12 PM
Oct 9th, 2004, 09:35 AM
Good stuff Omar!
Oct 10th, 2004, 07:54 AM
I updated the interceptor to impement the following changes:
- MethodCacheInterceptor now implements InitializingBean
- removed property methodNames and setter setMethodNames(java.lang.String)
- MethodCacheInterceptor can be configured using regular PointCutAdvisor
- using org.springframework.util.Assert to eagerly check if property cache is not null
Dec 1st, 2004, 05:49 AM
I went through all available samples threads and books by now,
can someone provide a easy streight forward and standard ehcache configuration sample for Swing and hibernate. No specialties just so that the Spring and Hibernate work at its default best way together.
I feal the following things are missing in documentation:
- A sample configuration with no extras, I want to learn how it is thought to be applied by default. I cant figure out how to link this EhCacheFactoryBean into Sessionfactory over Swing.
- Also an explanation whats with all these cacheQueries settings in Springs classes, which are required what is set up by default? :(
Dec 9th, 2004, 03:25 AM
it seems i dont have to do anything with spring,
just follow the hibernate configuration
(found at http://www.hibernate.org/158.html )
this is: add <cache usage="read-write"/> into the class descriptions in the hbm files, (later one should add also a ehcache.xml file into the root of classes folder but for now it will fall back to a default configuration)
Also i had to change sessionfactory.find() methods by Sessionfactory.iterate()
now it does something, speed came down from half a second for reloading 600 Objects to 0.1 second,
Feb 23rd, 2009, 06:44 AM
Does anyone know if there's an up-to-date version of this document (http://opensource.atlassian.com/confluence/spring/display/DISC/Caching+the+result+of+methods+using+Spring+and+EHC ache)? This one was written in 2004 and maybe there are other ways of using Ehcache in conjunction with Spring.
Oct 4th, 2011, 08:09 AM
Another very good Spring, EhCache article
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.