Repository navigation
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Description
Thomas Pasch opened SPR-9542 and commented
I've got a spring bean derived from java.awt.Component in my context. The log file (spring on debug) is like:
2012-06-23 16:10:46,834 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.task.PersonalTaskController': AutowiredMethodElement for void org.nuclos.client.ui.Controller.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:10:46,837 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
2012-06-23 16:10:47,316 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public void java.awt.Component.setSize(int,int)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:10:47,545 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public void java.awt.Component.setLocation(int,int)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:10:52,387 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public final void javax.swing.JComponent.setInputMap(int,javax.swing.InputMap)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:10:52,653 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public void javax.swing.JComponent.setFocusTraversalKeys(int,java.util.Set)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:10:57,018 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public void java.awt.Component.setLocation(int,int)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:11:02,023 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public final void javax.swing.JComponent.setInputMap(int,javax.swing.InputMap)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:11:02,227 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public void javax.swing.JComponent.setFocusTraversalKeys(int,java.util.Set)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:11:04,968 DEBUG AWT-EventQueue-0 [springframework.beans.ExtendedBeanInfo] - Could not add indexed write method [public void java.awt.Component.setSize(int,int)] for property [component]. Reason: type mismatch between indexed read and indexed write methods: component
2012-06-23 16:11:05,467 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Found injected element on class [org.nuclos.client.task.PersonalTaskView]: AutowiredMethodElement for void org.nuclos.client.task.TaskView.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:05,472 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.task.PersonalTaskView': AutowiredMethodElement for void org.nuclos.client.task.TaskView.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:05,476 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
2012-06-23 16:11:05,477 DEBUG AWT-EventQueue-0 [factory.annotation.AutowiredAnnotationBeanPostProcessor] - Autowiring by type from bean name 'org.nuclos.client.task.PersonalTaskView' to bean named 'springLocaleDelegate'
2012-06-23 16:11:06,975 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Found injected element on class [org.nuclos.client.task.PersonalTaskTableModel]: AutowiredMethodElement for void org.nuclos.client.ui.model.AbstractListTableModel.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:06,985 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.task.PersonalTaskTableModel': AutowiredMethodElement for void org.nuclos.client.ui.model.AbstractListTableModel.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:06,987 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
2012-06-23 16:11:06,987 DEBUG AWT-EventQueue-0 [factory.annotation.AutowiredAnnotationBeanPostProcessor] - Autowiring by type from bean name 'org.nuclos.client.task.PersonalTaskTableModel' to bean named 'springLocaleDelegate'
2012-06-23 16:11:08,339 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Found injected element on class [org.nuclos.client.ui.collect.component.CollectableTextField]: AutowiredMethodElement for void org.nuclos.client.ui.collect.component.AbstractCollectableComponent.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:08,351 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.ui.collect.component.CollectableTextField': AutowiredMethodElement for void org.nuclos.client.ui.collect.component.AbstractCollectableComponent.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:08,353 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
2012-06-23 16:11:08,354 DEBUG AWT-EventQueue-0 [factory.annotation.AutowiredAnnotationBeanPostProcessor] - Autowiring by type from bean name 'org.nuclos.client.ui.collect.component.CollectableTextField' to bean named 'springLocaleDelegate'
2012-06-23 16:11:08,539 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.ui.collect.component.CollectableTextField': AutowiredMethodElement for void org.nuclos.client.ui.collect.component.AbstractCollectableComponent.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:08,543 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
2012-06-23 16:11:09,090 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.ui.collect.component.CollectableTextField': AutowiredMethodElement for void org.nuclos.client.ui.collect.component.AbstractCollectableComponent.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:09,097 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
2012-06-23 16:11:10,010 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Found injected element on class [org.nuclos.client.ui.collect.component.CollectableDateChooser]: AutowiredMethodElement for void org.nuclos.client.ui.collect.component.AbstractCollectableComponent.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:10,012 DEBUG AWT-EventQueue-0 [factory.annotation.InjectionMetadata] - Processing injected method of bean 'org.nuclos.client.ui.collect.component.CollectableDateChooser': AutowiredMethodElement for void org.nuclos.client.ui.collect.component.AbstractCollectableComponent.setSpringLocaleDelegate(org.nuclos.common2.SpringLocaleDelegate)
2012-06-23 16:11:10,013 DEBUG AWT-EventQueue-0 [factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'springLocaleDelegate'
In other words:
-
Whenever I've got 'Could not add indexed write method...' my application stalls for over one second.
-
As 'Could not add indexed write method...' is there over and over and over in the log, this seems to be a performance hit.
-
Perhaps it would be better to cache if 'adding an indexed write method' is not possible.
Affects: 3.1.1, 3.2 M1
Issue Links:
- Overhaul non-void JavaBean write method support [SPR-10029] #14663 Overhaul non-void JavaBean write method support
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Jun 29, 2012
Chris Beams commented
Hi Thomas,
To help expedite this, please consider adding a reproduction project, or contributing a pull request per the contributor guidelines. In any case, thanks for the report.
spring-projects-issues commentedon Aug 30, 2012
Thomas Pasch commented
Looking around I wonder if #10920 describes the same problem. It has a small test case, anyway.
spring-projects-issues commentedon Sep 9, 2012
Chris Beams commented
Hi Thomas,
As of #14357,
ExtendedBeanInfois no longer part of the default code path; it is only used for bean classes that actually declare "non-standard" java beans setter methods, i.e. those with non-void return types.This means that
ExtendedBeanInfowon't have anything to do withjava.awt.Componentand subclasses (unless your subclass happens to declare non-void returning setter methods, which is highly unlikely).Thefore, I'm resolving this as Won't Fix. This isn't to say that there isn't a potential problem here, but rather that the problem is now very likely moot with regard to your situation.
spring-projects-issues commentedon Nov 25, 2012
Chris Beams commented
A general note to watchers of
ExtendedBeanInfo-related issues: #14663 is a major refactoring ofExtendedBeanInfoand overall support for non-void returning setter methods.If you have submitted a reproduction project with this issue, we have run it through its paces against these new changes, but we would like to ask you to do the same against your actual applications.
Please consider updating your dev or test builds to work against 3.1.4.BUILD-SNAPSHOT and/or 3.2.0.BUILD-SNAPSHOT to verify, and we would appreciate any feedback, even if it's to let us know that all is well. So that we can consolidate feedback, please add your comments to #14663, and mention the original issue(s) that you were watching.
Thanks!
Note also that testing against 3.1.4 is preferable to 3.2.0 because
ExtendedBeanInfois always in the code path in the latter, while in 3.2.0 we've optimized things such thatExtendedBeanInfois only in play for bean classes that have one or more non-void returning setter methods.