<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=daigo" rel="nofollow">Daigo Kobayashi</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-2657?redirect=false" rel="nofollow">SPR-2657</a></strong> and commented</p>
<p dir="auto">There is no way to display success message(s) like struts' ActionMessage. Spring should provide Messages inteface in a similar way of Errors and related tag libraries.</p>
<hr>
<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="398100054" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11130" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11130/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11130">#11130</a> Flash Scope  for Spring MVC (Without Spring Web Flow) (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">12 votes, 12 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=awilkinson" rel="nofollow">Andy Wilkinson</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9255?redirect=false" rel="nofollow">SPR-9255</a></strong> and commented</p>
<p dir="auto">I've been bitten in the past by an intermittent <code class="notranslate">BeanCurrentlyInCreationException</code> when I've <code class="notranslate">@Autowired</code> a <code class="notranslate">FactoryBean</code> implementation. I believe that this is considered to be a no-no, but occassionally I forget and lose hours to diagnosing the problem until the penny drops. An example can be seen in <a href="https://issuetracker.springsource.com/browse/VMS-604" rel="nofollow">https://issuetracker.springsource.com/browse/VMS-604</a>. Today, I've been bitten by a variation of this same problem.</p>
<p dir="auto">This time, rather than having an <code class="notranslate">@Autowired</code> <code class="notranslate">FactoryBean</code> I've got an <code class="notranslate">@Autowired</code> class that's a dependency of the <code class="notranslate">FactoryBean</code>. I believe this means that to avoid a possible <code class="notranslate">BeanCurrentlyInCreationException</code> I need to avoid using <code class="notranslate">@Autowired</code> on a <code class="notranslate">FactoryBean</code> and also on anything in the <code class="notranslate">FactoryBean</code>'s dependency graph.</p>
<p dir="auto">The main problem here is the intermittent nature of the failure. There appears to be something non-deterministic in the code that finds all of the candidates for a dependency. This, I'm guessing, is what makes the failure intermittent which, in turn, makes it harder to diagnose. I'm also wondering how Spring guarantees that there's only one possible candidate for the dependency if it, apparently, doesn't always need to initialise the <code class="notranslate">FactoryBean</code> to satisfy the dependency. Is there a risk that it might miss the fact that there are multiple candidates, or is there something about one ordering which means that it can successfully initialise the <code class="notranslate">FactoryBean</code> to check the type that it will produce without also triggering a <code class="notranslate">BeanCurrentlyInCreationException</code>?</p>
<p dir="auto">Ideally, dependency resolution would be deterministic so that this problem happen none of the time or all of the time. Right now it's dangerous as the problem can be lurking for days or weeks until it occurs. If deterministic dependency resolution isn't possible, I'd love to see some improved diagnostics for this problem. Something that pointed out the dangerous use of <code class="notranslate">@Autowired</code> on a <code class="notranslate">FactoryBean</code> or one of its dependencies would be a big help.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 GA</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="398114610" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13346" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13346/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13346">#13346</a> Doc: <code class="notranslate">@Autowired</code> properties not reliably set in FactoryBean before getObject (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-attic/spring-framework-issues/commit/6fa97fa4564a189069382bd126e69c8d666ab50e/hovercard" href="https://github.com/spring-attic/spring-framework-issues/commit/6fa97fa4564a189069382bd126e69c8d666ab50e">spring-attic/spring-framework-issues@<tt>6fa97fa</tt></a>, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-attic/spring-framework-issues/commit/189ba5b80dfcb65bf6821d11da80f6616ca8115c/hovercard" href="https://github.com/spring-attic/spring-framework-issues/commit/189ba5b80dfcb65bf6821d11da80f6616ca8115c">spring-attic/spring-framework-issues@<tt>189ba5b</tt></a></p>
<p dir="auto">2 votes, 4 watchers</p>