<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=barryl" rel="nofollow">Barry Lagerweij</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-323?redirect=false" rel="nofollow">SPR-323</a></strong> and commented</p>
<p dir="auto">EJB's that depend on other beans cannot use Dependency Injection. Instead, they must use code like</p>
<p dir="auto">ProductDAO dao = super.getBeanFactory().getBean("ProductDAO");</p>
<p dir="auto">It would be a huge improvement if EJB's could have something like:</p>
<p dir="auto">ProductDAO getProductDAO () { return this.productDAO; }<br>
void setProductDAO ( ProductDAO dao) { this.productDAO = dao; }</p>
<p dir="auto">For this to work, it would be nice if Spring would support a marker interface (like BeanNameAware), so that Spring could determine a EJB's name, and inject dependant objects.</p>
<p dir="auto">Spring already provides an AbstractStatelessSessionBean base-class. This class needs to be improved.</p>
<p dir="auto">For example:</p>
<p dir="auto">AbstractStatelessSessionBean<br>
{<br>
void ejbCreate()<br>
{<br>
if (this instanceof BeanNameAware)<br>
{<br>
String name = ((BeanNameAware)this).getName();<br>
XXXUtils.injectDependencies(getBeanFactory(),name,this);<br>
}<br>
}<br>
}</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.1 final</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="398061009" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/6115" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/6115/hovercard" href="https://github.com/spring-projects/spring-framework/issues/6115">#6115</a> Allow declarative dependency injection for EJB components (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto">3 votes, 2 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=bubbapuryear" rel="nofollow">Bubba Puryear</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-1432?redirect=false" rel="nofollow">SPR-1432</a></strong> and commented</p>
<p dir="auto">The FreeMarkerConfigurer class cleverly adds a ClassTemplateLoader in it's postProcessConfiguration() callback. While it is certainly possible for developers to subclass this class and "do the same trick" to add their own ClassTemplateLoaders, this seems like overkill. Just having an option property on the class of TemplateLoader[] that gets added to the MultiTemplateLoader puts it all in configuration. I'll attach a small patch after I get this issue openned.</p>
<p dir="auto">Our local need arises out of having several project that use Spring w/ FreeMarker and we'd like to share some common FreeMarker macros. Putting the ftl in a common jar seems like a reasonably way to distribute these macros, so we'd like an easy way to tell Spring to tell FreeMarker to look in a couple of places to find macro files.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 1.2.5</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/11239/freemarker.configurer.patch" rel="nofollow">freemarker.configurer.patch</a> (<em>1.83 kB</em>)</li>
</ul>
<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="398060517" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/6060" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/6060/hovercard" href="https://github.com/spring-projects/spring-framework/issues/6060">#6060</a> Make it possible to wire multiple template loaders with FreemarkerConfigurer (<em><strong>"duplicates"</strong></em>)</li>
</ul>