Results 1 to 9 of 9

Thread: ehcache example?

  1. #1
    Join Date
    Sep 2004
    Posts
    26

    Default ehcache example?

    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

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    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.
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

  3. #3
    Join Date
    Sep 2004
    Posts
    26

    Default

    Fantastic! Thanks!
    ,boz

  4. #4
    Join Date
    Aug 2004
    Location
    Toronto, Canada
    Posts
    736

    Default

    Good stuff Omar!

  5. #5
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    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
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

  6. #6
    Join Date
    Dec 2004
    Posts
    2

    Default Sample ehCache

    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?

  7. #7
    Join Date
    Dec 2004
    Posts
    2

    Default getting hibernate secondary cache to work

    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,

  8. #8

    Default

    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.

  9. #9
    Join Date
    Sep 2011
    Posts
    6

    Default Spring, EhCache article

    Another very good Spring, EhCache article

    http://eiconsulting.blogspot.com/201...in-spring.html

Similar Threads

  1. Acegi + EhCache in cluster environment
    By newreaders in forum Security
    Replies: 10
    Last Post: Nov 9th, 2007, 07:20 PM
  2. EHCache + Hibernate + Spring
    By BenPoweski in forum Data
    Replies: 1
    Last Post: Oct 5th, 2005, 05:18 AM
  3. Spring - Hibernate - EHCache - Web App
    By macalla in forum Data
    Replies: 3
    Last Post: Jun 15th, 2005, 04:46 AM
  4. EhCache Error
    By monkeyMojo in forum Security
    Replies: 3
    Last Post: Dec 31st, 2004, 04:24 PM
  5. Problem with userCache using ehCache.
    By nicholsl in forum Security
    Replies: 1
    Last Post: Oct 14th, 2004, 04:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •