Getter is not an issue, its because Spring relies on debug information to 
extract argument name. Try looking 
through com.google.inject.internal.BytecodeGen, as I understand that is the 
class responsible for proxy generation. Maybe looking though it you'll find 
that it's possible to enable debug info on CGLIB generated classes? Because 
Spring somehow does it on both JDK proxies and CGLIB generated.

On Monday, April 8, 2013 9:03:53 PM UTC+3, alesj wrote:
>
> Can't you force Spring to access this variable via getter?
>
> On Apr 8, 2013, at 19:49, Ilya Karpov <[email protected] <javascript:>> 
> wrote:
>
> Hi guys!
> In our app we are mixing guice(3) and spring(3.1). We use spring 
> transactions via guice interceptor. It works ok and I thought that it's now 
> a bad idea to use not only spring transaction management but cache too. 
> Unfortunately there is a problem: when guice injects an object which method 
> is intercepted (for example a DAO with @Cachable annotation) it makes 
> bytecode injection via cglib and replaces actual class with EnhancerByGuice 
> class. When spring tries to evaluate SpEL expression (for example: 
> @Cachable(value = "person", key = "*#person.id*")) it fails because it 
> can't find such a variable in enhanced class. Because Spring makes proxies 
> and that is not an issue.
> Guys, can you suggest any solution for this problem?
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "google-guice" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> Visit this group at http://groups.google.com/group/google-guice?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to