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! :-)\
,boz
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! :-)\
,boz
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
I will implement some of the improvements and add this interceptor to JIRA.
Fantastic! Thanks!
,boz
Good stuff Omar!
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
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?![]()
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()
(see:
http://www.hibernate.org/61.html )
now it does something, speed came down from half a second for reloading 600 Objects to 0.1 second,
Does anyone know if there's an up-to-date version of this document? This one was written in 2004 and maybe there are other ways of using Ehcache in conjunction with Spring.
Another very good Spring, EhCache article
http://eiconsulting.blogspot.com/201...in-spring.html