MBeanExporter#autodetect() method is supposed to register all the beans in the JMX server.
which in turn returns all the bean names.
If there's a bean defined with prototype scope, it will be included in the list, and MBeanExporter will run beanFactory.getBean(beanName) to get one instance. So an unrequested instance of a prototype bean would be created. Which is wrong.