Updates:
Status: WorkingAsIntended
Comment #2 on issue 737 by [email protected]: Interceptor enhanced classes
not participating in type listener
http://code.google.com/p/google-guice/issues/detail?id=737
Your matcher uses:
return type.getRawType().isAnnotationPresent(MBean.class);
but because the AOP proxy class generated by CGLIB doesn't redeclare the
class annotation (and the JEE MBean annotation is not declared as
@Inherited) then this matcher won't match the enhanced instances.
To handle this you need to use something like:
return type.getRawType().isAnnotationPresent(MBean.class) ||
type.getRawType().getSuperclass().isAnnotationPresent(MBean.class);
Note that any generated AOP classes will have 'ByGuice' in their name, so
you could always use this to decide whether to check the superclass or not.
Alternatively you could always walk up the superclass hierarchy which would
then work for other proxied classes from other frameworks.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" 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-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.