wangpeng138375 / pojo-mbean

Automatically exported from code.google.com/p/pojo-mbean
0 stars 0 forks source link

Unable to find annotations on JDK proxy #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The annotated methods on an interface implemented by a JDK dynamic proxy 
handler are not discoverable presently.

Suggestion:

A. Use Proxy.isProxyClass
B. When proxy use Proxy.getInvocationHandler

From here it gets tricky.  At a minimum the handler should be annotated with 
@MBean.  Potentially you could scan the handler for annotated methods.

I'm happy to kick out a prototype if intersted.

Original issue reported on code.google.com by b.k.ox...@gmail.com on 25 Jun 2013 at 11:40

GoogleCodeExporter commented 8 years ago
Unsure how to change from Defect to Enhancement.

Original comment by b.k.ox...@gmail.com on 25 Jun 2013 at 11:41

GoogleCodeExporter commented 8 years ago
Please close & disregard - I researched this more, it's a fundamental 
limitation with JDK proxies.  You lose all method annotations.

Original comment by b.k.ox...@gmail.com on 7 Aug 2013 at 1:06