teo sarca opened SPR-14189 and commented
Consider following example
@Service
@ManagedResource(...)
public void MyService
{
@ManagedOperation(....)
public void myJmxMethod() { ... }
@Transactional
public void someOtherTransactionalMethod();
}
This managed resource will not be detected nor registered because in org.springframework.jmx.export.MBeanExporter.autodetect(AutodetectCallback), the call "beanFactory.getType(beanName)" returns "Proxy" class so "callback.include(beanClass, beanName)" will not detect it.
I find this issue critical because it's so easy to break a managed resource that was working just by annotating with @Transactional
one of the methods, even if that method is not exposed.
Affects: 4.2.5
Issue Links: