Announcement Announcement Module
Collapse
No announcement yet.
ehcache example? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      Fantastic! Thanks!
      ,boz

      Comment


      • #4
        Good stuff Omar!

        Comment


        • #5
          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

          Comment


          • #6
            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?

            Comment


            • #7
              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,

              Comment


              • #8
                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.

                Comment


                • #9
                  Spring, EhCache article

                  Another very good Spring, EhCache article

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

                  Comment

                  Working...
                  X