Description
Celal Ziftci opened SPR-5926 and commented
Inside the MBeanExporter.autodetect(AutodetectCallback) method, there is a check as follows:
<code>
String[] beanNames = this.beanFactory.getBeanNamesForType(Object.class, true, this.allowEagerInit);
...
if (!isExcluded(beanName)) {
...
}
</code>
Here, the bean names for the factory beans are returned with a ampersand in front (like &someBean), and when the MBeanExporter is used in Spring config with excludedBeans set, one has to use smth like this to get the factoryBean created beans excluded:
<code>
<bean class="org.springframework.jmx.MBeanExporter">
<property name="excludedBeans" value="&someBean" />
</bean>
</code>
So all in all, the framework should know how to handle factory beans and the beans created via them.
Referenced from: commits 566eeba