<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=andriyrosa" rel="nofollow">Andriy Rosa</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9819?redirect=false" rel="nofollow">SPR-9819</a></strong> and commented</p>
<p dir="auto">For each method invocation for not-singleton scope bean<br>
Interceptor got bean from bean-factory by using AbstractBeanFactory.getBean</p>
<p dir="auto">But before getting required bean inside method getBean we have cheeking</p>
<p dir="auto">Object sharedInstance = getSingleton(beanName);<br>
if (sharedInstance != null &amp;&amp; args == null) {</p>
<p dir="auto">Inside getSingleton we have synchronized blocks.</p>
<p dir="auto">considering that in high-load project we can have a lot of scoped-beans methods invocations, getSingleton lock all threads, and performance gone to very poor.</p>
<p dir="auto">I'm not very good in spring-core architecture, however by my mean the most obvious solution - it push into args argument of getBean method specific arg, which will show, that we request not singleton bean for sure</p>
<p dir="auto">P.S.: Take my apologies for my bad English.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398092384" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10033" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10033/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10033">#10033</a> Threads bottlenecking in DefaultSingletonBeanRegistry when using Wicket's <code class="notranslate">@SpringBean</code> annotation for injection (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398113127" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13117" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13117/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13117">#13117</a> Performance bottleneck and potential thread deadlock in DefaultSingletonBeanRegistry</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398153130" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14414" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14414/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14414">#14414</a> AbstractBeanFactory#markBeanAsCreated performance issue due to lock contention</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398159771" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/15302" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/15302/hovercard" href="https://github.com/spring-projects/spring-framework/issues/15302">#15302</a> DefaultSingletonBeanRegistry::getSingleton(String beanName) attempts to create bean when it shouldn't</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398172289" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/16864" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/16864/hovercard" href="https://github.com/spring-projects/spring-framework/issues/16864">#16864</a> Further locking optimizations for the retrieval of non-singleton beans</li>
</ul>
<p dir="auto">0 votes, 5 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=manifoldronin" rel="nofollow">Jing Xue</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-3273?redirect=false" rel="nofollow">SPR-3273</a></strong> and commented</p>
<p dir="auto">After upgrading from 2.0.2 to 2.0.3, I'm getting the following exception during the loading of every context file, because my app doesn't use groovy. I know they are harmless and ignored, but it would be nice if DefaultNamespaceHandlerResolver could just not log the whole stack trace.</p>
<p dir="auto">02:21:58,130 DEBUG [main] org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver  - Ignoring handler [org.springframework.scripting.config.LangNamespaceHandler]: problem with class file or dependent class<br>
java.lang.NoClassDefFoundError: org/codehaus/groovy/control/CompilationFailedException<br>
at java.lang.Class.forName0(Native Method)<br>
at java.lang.Class.forName(Class.java:169)<br>
at org.springframework.scripting.config.LangNamespaceHandler.class$(LangNamespaceHandler.java:45)<br>
at org.springframework.scripting.config.LangNamespaceHandler.init(LangNamespaceHandler.java:45)<br>
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.initHandlerMappings(DefaultNamespaceHandlerResolver.java:123)<br>
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.&lt;init&gt;(DefaultNamespaceHandlerResolver.java:96)<br>
at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.&lt;init&gt;(DefaultNamespaceHandlerResolver.java:82)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDefaultNamespaceHandlerResolver(XmlBeanDefinitionReader.java:489)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createReaderContext(XmlBeanDefinitionReader.java:478)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:458)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:353)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)<br>
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:280)<br>
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:131)<br>
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:147)<br>
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)<br>
at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)<br>
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:100)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:298)<br>
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:241)<br>
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)<br>
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.3</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398076154" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/7935" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/7935/hovercard" href="https://github.com/spring-projects/spring-framework/issues/7935">#7935</a> LangNamespaceHandler cannot be registered in DefaultNamespaceHandlerResolver when thrid party library is not found (<em><strong>"duplicates"</strong></em>)</li>
</ul>