qianjava / ehcache-spring-annotations

Automatically exported from code.google.com/p/ehcache-spring-annotations
0 stars 0 forks source link

ehcache annotation-driver versus declarative dependency injection #100

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. I have a class which has an @Cacheable method
2. In the same class i have dependency injections done by a spring declarative 
way
3. My spring configuration of ehcache annotation is :
<ehcache:annotation-driven cache-manager="global-cacheManager"  
proxy-target-class="true"/>
==> This is required as, without proxy-target-class="true", ehcache or Async 
annotations intercept my methods without keeping other aop interceptor I added 
on Spring

Process should "proxify" my class with @Cacheable capabilities then it should 
inject in this class my other dependencies
Instead of that, it injects my dependencies in an instance and final process 
uses another instance proxified by CGLIB.

Is there a way to solve this problem ?

Version of ehcache-spring-annotations : 1.2.0
Spring version : 3.1.0

I also posted a message on Spring forums :
http://forum.springsource.org/showthread.php?128929-Async-versus-RegexpMethodPoi
ntcutAdvisor&p=421016

Original issue reported on code.google.com by pile...@gmail.com on 3 Aug 2012 at 8:11