1

In application used annotations for mark mbeans (spring annotation - managed resource). I tried to add aop for logging operations which were invoked on mbeans. But later mbeans dissappeared from jconsole mbean viewer. AFAIK it happens due AOP substitutes original class with proxy. Is it possible to keep annotations? Or only solution is to create intermediate class for mbeans?

Anirudh
  • 2,286
  • 4
  • 38
  • 64
user710818
  • 23,228
  • 58
  • 149
  • 207

1 Answers1

0

Short answer: Yes, it is definitely possible

To determine your exact issue, we would need to see the aop and bean configuration you had/have.

When I had a similar issue to you, the problem was that my @EnableAspectJAutoProxy annotation needed proxyTargetClass set to true (default is false).

See questions/10664182 for an explanation on that setting.

Community
  • 1
  • 1
doc
  • 765
  • 1
  • 6
  • 24