Discussion:
Digest for google-guice@googlegroups.com - 2 updates in 1 topic
Jeff Drost
2017-05-16 15:11:15 UTC
Permalink
<https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/google-guice/topics> Google
Groups
<https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
<https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
Topic digest
View all topics
<https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/google-guice/topics>
- MethodInterceptor for class extending ebean Model not working
<#m_1773493022233247644_group_thread_0> - 2 Updates
MethodInterceptor for class extending ebean Model not working
<http://groups.google.com/group/google-guice/t/41df49875b3d2e16?utm_source=digest&utm_medium=email>
No, I am not injecting instances of Company into classes.
I am actually trying intercept methods of Company which is extending Ebean
Model.
I have tried AspectJ too, but with little luck.
Ack wrt foo.
I am basically trying to write a cache layer, which uses redis as cache,
and ebean as backend, so the plan is to intercept getters/setters of ebean
model, and perform cache ops.
Be aware that AOP adds overhead onto these operations. I had to revert
usage of AOP in a project once where we some of the methods were called
very frequent. In most cases it is no problem but if you application
will make heavy use of these getters and setters it could become
noticeable.
Guice can only intercept method on objects it has created. This means if
you want to be able to intercept methods on objects which are of type
Company (or a subclass of it) then you must use Guice to create this
object. Either by having Guice inject it into your code or by calling
injector.getInstance().
Back to top <#m_1773493022233247644_digest_top>
You received this digest because you're subscribed to updates for this
group. You can change your settings on the group membership page
<https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/google-guice/join>
.
To unsubscribe from this group and stop receiving emails from it send an
--
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAOG%3DMdG%3DCVnUJBcD5-pSd%3DOun2S3nK5J%2BFCDnK5icMadspEQBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...